Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50049

Macro to fill down while looking at adjacent col

$
0
0
Gday

Long time reader, first time poster.

Im working on a file with requires unique numbers placed in adjacent cells for a series, then repeat this for the next series below with more unique numbers.

I would like to find a macro that does this

What I would like to do is grab "05" and fill down but only till to the last row in the adjacent cells in row P. Then step down to next populated cell in row "O"(O43) and do the same again. The number of values in Col "P" varies every time.


PHP Code:

[B]Before[/B]

EXA01    DISPLAY and comply with relevant Material Safety Data Sheet (MSDS)
                      
Attach Flange Management Checklist
                       Attach Own Isolations Certficate
                       CONDUCT end of Shift 
`Eye Check` for personnel
                       DECANT in a designated 
contained area 
                       DISPOSAL via local drain to activity is approved by Operations
                       DISPOSAL via local drain to activity is not approved by Operations
    
    
    
    
EXB01    DISPLAY 
and comply with relevant Material Safety Data Sheet (MSDS)
    
Attach Flange Management Checklist
    Attach Own Isolations Certficate
    DECANT in a designated 
contained area 
    DISPOSAL via local drain to activity is approved by Operations
    DISPOSAL via local drain to activity is not approved by Operations
    ENSURE all containers are appropriately marked
    ENSURE all samples are appropriately marked
    ENSURE all waste is appropriately marked
    ENSURE Breathing Apparatus 
(BAis available at worksite
    ENSURE containment devices in place to protect drainage systems
    ENSURE containment devices in place with capacity 
for recovery
    
    
    
EXC01    DISPLAY 
and comply with relevant Material Safety Data Sheet (MSDS)
    
PERFORM work with a minimum of two persons
    PROVIDE a continuous Extraction System
    PROVIDE a continuous Ventilation System
    PROVIDE a personal Fume Extraction System
    SAMPLE waste 
for positive identification verification
    SETUP 
and test a portable Emergency Eye Wash Station
    SETUP 
and test portable Emergency Shower
    UTILISE Breathing Apparatus 
(BA)

[
B]After[/B]

EXA01    DISPLAY and comply with relevant Material Safety Data Sheet (MSDS)
EXA02    Attach Flange Management Checklist
EXA03    Attach Own Isolations Certficate
EXA04    CONDUCT end of Shift 
`Eye Check` for personnel
EXA05    DECANT in a designated 
contained area 
EXA06    DISPOSAL via local drain to activity is approved by Operations
EXA07    DISPOSAL via local drain to activity is not approved by Operations
    
    
    
    
EXB01    DISPLAY 
and comply with relevant Material Safety Data Sheet (MSDS)
EXB02    Attach Flange Management Checklist
EXB03    Attach Own Isolations Certficate
EXB04    DECANT in a designated 
contained area 
EXB05    DISPOSAL via local drain to activity is approved by Operations
EXB06    DISPOSAL via local drain to activity is not approved by Operations
EXB07    ENSURE all containers are appropriately marked
EXB08    ENSURE all samples are appropriately marked
EXB09    ENSURE all waste is appropriately marked
EXB10    ENSURE Breathing Apparatus 
(BAis available at worksite
EXB11    ENSURE containment devices in place to protect drainage systems
EXB12    ENSURE containment devices in place with capacity 
for recovery
    
    
    
EXC01    DISPLAY 
and comply with relevant Material Safety Data Sheet (MSDS)
EXC02    PERFORM work with a minimum of two persons
EXC03    PROVIDE a continuous Extraction System
EXC04    PROVIDE a continuous Ventilation System
EXC05    PROVIDE a personal Fume Extraction System
EXC06    SAMPLE waste 
for positive identification verification
EXC07    SETUP 
and test a portable Emergency Eye Wash Station
EXC08    SETUP 
and test portable Emergency Shower
EXC09    UTILISE Breathing Apparatus 
(BA

Currently what happens is it will fill all the way to the bottom of the last entry. I would like to fill but only in line with the current series next to it.

Fill Down1.xlsx

Thanks in advance.

Viewing all articles
Browse latest Browse all 50049

Trending Articles