Formula Solution - Look-up last value from this row or above

southern5footer

New Member
Joined
Sep 21, 2016
Messages
9
I'm trying to find a non-vba solution to this problem and I've searched and searched online but I think I might not know the correct terms to search effectively.

I want to populate every row of column A with the correct name in column B. so A1&A2 are Frank, A3&A4 would be Leslie and A5 would be Joe.

Is there a formula that could look-up starting in the row your in going up until it gets a value?

Row #Column AColumn B
1Frank
2
3Leslie
4
5Joe

<tbody>
</tbody>
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Thank you for your reply and for excusing my typos that I now notice. (I do know the difference between your and you're, I promise!)

The lookup function is where I went first but I won't know the value I'm looking up and therefore I'm a bit stuck.

Assuming I'm in A4. I need to lookup starting in B4, then B3 where I would find "Leslie" and in A4 the result would be "Leslie". Maybe it should be lookup combined with isblank.
 
Upvote 0
I'm not entirely sure I'm following what you are trying to achieve or I'm just misunderstanding what you need.

the lookup in A1 will simply return the name in column B until the next populated cell in column B.

Unknown
AB
1FrankFrank
2Frank
3LeslieLeslie
4Leslie
5JoeJoe

<tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
A1=LOOKUP("zzzz",$B$1:B1)

<tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
How about the following formulas in column A:

Formula in A1
=B1

Formula in A2, and copied down:
=IF(B2="",A1,B2)

Brian

Brian J. Torreano
 
Upvote 0
Yes, that works (THANKS!) unless there are more than 1 space between. There could be 10 or 20 empty cells. It might have to be vba, or a very very large nested statement!?
 
Upvote 0
zzzz would just really be a large text string, ideally it assumes you wouldn't have any text values larger then that.

very similiar to a very large number except for letters.

I suppose a more 'professional' way of writing it would be =LOOKUP(REPT("z",255),$B$1:B1) which would repeat the letter z 255 times.

this works in conjunction with how the Lookup function handles data because it only does approximate match.
 
Upvote 0
I suppose a more 'professional' way of writing it would be =LOOKUP(REPT("z",255),$B$1:B1) which would repeat the letter z 255 times.
No, nothing wrong with "zzzz". I typically use "zzzzz".

The lookup value simply needs to be larger than any value in the lookup range. PERIOD!
 
Upvote 0

Forum statistics

Threads
1,215,522
Messages
6,125,312
Members
449,218
Latest member
Excel Master

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