Populate column based on next, blanks inbetween. frustration.

zuki01

New Member
Joined
Jul 25, 2014
Messages
23
Hi everybody.
I’ve looked through the posts and there are some very similar but nothing I can use. I’m pretty good with VBA if there is a VBA solution to this frustrating nightmare problem!!!
I have 2 columns of data. One is sporadic with a code in every cell or other cell or with a few blank gaps in-between, but in clusters. E.g.
Code1
*blank cell*
Code 1
Code 1
Code 1 *New Code*
Code 2
Code 2
*Blank Cell*
*Blank Cell*
Code 2
Code 3
Code 3 *New Code*
Code 4
Code 4
*Blank Cell*


In the column next to it the formulae works out when to code should change based on a data page elsewhere.
I have a blank column which I want a formula to look at the New Code column and fill in every cell with the code until it says new code, then fill in with the next one.
Any ideas, I’ve tried Ifs and tried to put an index column where it looks up blanks but to no avail. 
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Forum statistics

Threads
1,215,548
Messages
6,125,472
Members
449,231
Latest member
Sham Yousaf

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top