Question

I've got a spreadsheet of company names and their associated websites next to some of them. I need to create a formula to fill in the missing website data with the correct data when the website is next to a company name.

For instance in the screenshot below, the value in B3 needs to be copied into B2. Same with B7 into B6. And B13 into B12 and B11 and so fourth.

Some companies will have no website at all but if the website is present it will always be next to the last duplicate company name.

How could I create a formula to do this? I'm not sure where to start but I don't mind creating new columns and moving data around and sorting etc. if necessary.

enter image description here

Was it helpful?

Solution

To deal with company with no web site start with:

copy column C values except when COUNTIF A is 1 (insert a unique identifier instead, maybe ¬)

then (courtesy of @simoco):

Select entire range with your data. Press CTRL+G and select Special.
Choose Blanks and press OK.
With selected cells type = and press ↑ key. Press CTRL+ENTER.
Now if you want you can copy result and make PasteSpecial-->Paste Values.

and finally:

replace ¬ with nothing.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top