Result "x" in Column A if Column B starts with a number

mlarson

Well-known Member
Joined
Aug 25, 2011
Messages
509
Office Version
  1. 2010
Platform
  1. Windows
Hello everybody! I hope somebody can help me with this problem. Thanks in advance for taking a look.

I would like a formula that returns "x" in Column A for any cell from Column B that is in the same row and starts with a number, and return blank if it starts with a letter. For example...
If B5 contains "34banana" then I would want an "x" to be the result in A5.
If B28 contains "banana" then I want blank to be the result in A28.
If B99 contains "127. amsterdam" then I want A99 to be "x".

Thanks again for your help!
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
=ISNUMBER(LEFT(B1,1)*1)
=IF(ISNUMBER(LEFT(B1,1)*1),"x","")

Book7
AB
1x34banana
2 banana
3x127
4 banana
Sheet1
Cell Formulas
RangeFormula
A1:A4A1=IF(ISNUMBER(LEFT(B1,1)*1),"x","")


NOTE, after this evening xmas eve, I will be seeing family for a few days, back on 30th Dec
So i may not reply now until then - sorry if i have misunderstood - or leave hanging
Hopefully other members will pickup before
 
Upvote 0
Assuming the text always starts with either a digit or a letter, and that you do not copy the formula past the end of the data, then you could also use this formula...

=LEFT("x",LEFT(B1)<="9")
 
Upvote 0
Or try:

=TEXT(LEFT(B1),"x;;;")

Hi,

0KKL
If Item start with zero, formula fail.
Assuming the text always starts with either a digit or a letter, and that you do not copy the formula past the end of the data, then you could also use this formula...

=LEFT("x",LEFT(B1)<="9")
iF there are empty cell your formula put an X

etaf formula is OK
 
Upvote 0

Forum statistics

Threads
1,214,588
Messages
6,120,409
Members
448,959
Latest member
camelliaCase

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