Hi,
Could you please help me to edit below function to let me know If Cell Begins with another cell or not.
=IF(LEFT(TRIM(A2),1)="s","OK","Not OK")
My target is check if Numbers in A2 start with C2 values.
Phone | Status | Key |
8475755 | No | 87 |
435566 | Yes | 4 |
436576 | Yes | 4365 |
Its always better to upload an example workbook so we know how the data is setup
Are you after something like this?
=IF(TRIM(LEFT(A2,LEN(C2)))+0=C2,"Ok","not Ok")
Purfleet
Hi Purfleet,
It works perfectly, Thank you very much!
Grateful for your support..
Thanks;
Marsil
Hi Marsil
Nothing attached, but to break it down (I am sure you know most of it)
=IF(TRIM(LEFT(A2,LEN(C2)))+0=C2,"Ok","not Ok")
Len(C2) gets the number of characters to check
Left(a2) gets the left characters for the number of the above Len
Trim makes sure there is no random spaces
and if makes the determination
the +0 makes the text from the trim/left/len into a number
Hope that helps
Hi Purfleet,
Thank you very much; your support is greatly appreciated.
Please check attached file and try to handle the function please.
Thanks;
Marsil
Just remove the +0 from the formula, since your values are not numeric. If you need to handle both numbers and text in the same formula, you could use:
=IF(TRIM(LEFT(A2,LEN(C2)))=""&C2,"Yes","No")