Burrgogi
Active Member
- Joined
- Nov 3, 2005
- Messages
- 495
- Office Version
- 2010
- Platform
- Windows
In col. A, I have some "stuff"... mostly text.
In Col. B, I have this:
B1: Peaches
B2: --
B3: Oranges
B4: --
B5: --
B6: Nuts & Bolts
B7: Smith & Kline
B8: --
B9: Swimming Pool
B10: --
B11: --
B12: --
B13: --
B14: --
meaning that there is nothing contained in cell A15. So Loop, 'copy & paste' action as long as there is something in col. A.
dashes '--' denote empty cells.
Is there some function or VBA routine that can automatically fill in the empty cells so that for example in B2, it will show the value just above it - which in this case is Peaches. Copy & paste works fine, but the problem is that the number of empty cells (as you can see from the example here) varies. So if you look at the last item Swimming Pool, there are 5 empty rows compared to peaches which has only 1 empty cell. I'm trying to get the end result to look like this:
B1: Peaches
B2: Peaches
B3: Oranges
B4: Oranges
B5: Oranges
B6: Nuts & Bolts
B7: Smith & Kline
B8: Smith & Kline
B9: Swimming Pool
B10: Swimming Pool
B11: Swimming Pool
B12: Swimming Pool
B13: Swimming Pool
B14: Swimming Pool
In Col. B, I have this:
B1: Peaches
B2: --
B3: Oranges
B4: --
B5: --
B6: Nuts & Bolts
B7: Smith & Kline
B8: --
B9: Swimming Pool
B10: --
B11: --
B12: --
B13: --
B14: --
meaning that there is nothing contained in cell A15. So Loop, 'copy & paste' action as long as there is something in col. A.
dashes '--' denote empty cells.
Is there some function or VBA routine that can automatically fill in the empty cells so that for example in B2, it will show the value just above it - which in this case is Peaches. Copy & paste works fine, but the problem is that the number of empty cells (as you can see from the example here) varies. So if you look at the last item Swimming Pool, there are 5 empty rows compared to peaches which has only 1 empty cell. I'm trying to get the end result to look like this:
B1: Peaches
B2: Peaches
B3: Oranges
B4: Oranges
B5: Oranges
B6: Nuts & Bolts
B7: Smith & Kline
B8: Smith & Kline
B9: Swimming Pool
B10: Swimming Pool
B11: Swimming Pool
B12: Swimming Pool
B13: Swimming Pool
B14: Swimming Pool
Last edited: