Return a value when Any text is in a specific cell

Traderlew

New Member
Joined
Oct 28, 2017
Messages
1
This is the fomula I want to put in the cells A2:A10
IF(B2=Text,A1+1," ")
IF(B3=Text,A2+1," ")

The red "Text" is what I don't know how to enter for it to work in the formula.

I simply want to have the cells in column A have numbers beginning with 1 only if there is Text in the respective cells in Column B.

I'm using Excel version 1905

Thank you for any help.

Lew
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Hi & welcome to MrExcel.
How about
=IF(ISTEXT(B2),N(A1)+1,"")
 
Upvote 0
Try this in A2 and fill down:

Code:
=IF(ISTEXT(B2),MAX($A$1:A1)+1,"")
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,901
Members
449,097
Latest member
dbomb1414

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