I need to start at D600 and go up D column looking for "St Louis". Once it is located put "GP01" in the next empty cell.
So if
D89 = "Atlanta"
D88 = "St Louis"
D87 = "Henry"
D86 = "Vehicle"
D85 = ""
D84 = "Canada"
The D85 would now equal "GP01
I need to start at D600 and go up D column looking for "St Louis". Once it is located put "GP01" in the next empty cell.
So if
D89 = "Atlanta"
D88 = "St Louis"
D87 = "Henry"
D86 = "Vehicle"
D85 = ""
D84 = "Canada"
The D85 would now equal "GP01
Something like:
should do it.Please Login or Register to view this content.
That put "GP01" in column, but not in the correct cell. There are going to be several empty cells throught out the range.
Hi,
I typed your example into a blank worksheet and the GP01 was inserted into D85.
Could you upload an example worksheet, for which it does not put it in the correct cell?
(for reference, the code finds the row with the last occurance of St Louis, moves up to the previous blank cell, and puts GP01 in it).
I copied it into a blank worksheet and tried it and it work. Im sorry. I must of did something incorrect earlier. Thanks for the help
I see what the proble is, If the cell is directly above "St Louis" is blank it will not count that one and go to the next above that. Can I change this somehow to fix that issue. So if
So if
D89 = "Atlanta"
D88 = ""
D87 = "Henry"
D86 = ""
D85 = "St Louis"
D84 = "Canada"
The D86 would now equal "GP01"
It looks like it would currently put it in D88 instead because it doesnt count D86 because it is directly above it
?Please Login or Register to view this content.
Thanks for all your help. That worked like a champ.
If you dont mind, I have one more question. Is there a reason that
""St Louis"" will work perfect but
""Indianapolis, IN"" wont work.
Do you think it has to do with the comma?
I can't see a reason why it would be different to St Louis but I noticed that if the cell below the last entry is blank the method in post #7 doesn't work. Try this:
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks