Formula to return the preceding cell which has a text string.

oscark37

Board Regular
Joined
Nov 23, 2015
Messages
56
I have a column B which has a mix of numbers and text. I want to put a formula in column A that when there is a number in column B of the same row, returns the next cell moving upwards that starts with text.

For example, the formula in A6 would return BEL023.

Any ideas?


Column AColumn B
AOF010
112823
BEL023
12121
323232
1321212
JEF233

<tbody>
</tbody>



Thanks,

Oscar
 
Last edited:

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Maybe...


A
B
1
Formula​
Values​
2
AOF010​
3
AOF010​
112823​
4
BEL023​
5
BEL023​
12121​
6
BEL023​
323232​
7
BEL023​
1321212​
8
JEF233​

Formula in A2 copied down
=IF(ISNUMBER(B2),LOOKUP(2,1/ISTEXT(B$1:B1),B$1:B1),"")

M.
 
Upvote 0

Forum statistics

Threads
1,215,606
Messages
6,125,805
Members
449,262
Latest member
hideto94

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