Excel-Check Data in one cell write to another

July 4, 2011 at 15:49:13
Specs: Windows XP

I am kinda of new to Excel and I have a question.

Here is my example:

Cell"B1" Contains letters and numbers (anywhere from 1 to 32 characters).

If the first 5 characters in "B1" = 11111* then I want Green to print in A1
However if the first 5 characters are 1azxc* then I want it to print Blue in A1.
However if the first 2 characters are 99* then I want it to print yellow in A1.

Can someone help me with trying to code this.
Any help is greatly appreicated.


See More: Excel-Check Data in one cell write to another

Report •

July 4, 2011 at 16:56:20
You didn't say what you want to appear in A1 if none of the 3 conditions exist.

This formula will present a text string if none of the values were found.

=IF(LEFT(B1,2)="99", "yellow", IF(LEFT(B1,5)="1azxc", "Blue", IF(LEFT(B1,5) = "11111", "Green", "No 99 or 1azxc or 11111")))

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Report •

July 4, 2011 at 19:54:09
Hi Derby Dad,

Thanks a lot!!! That did the trick. I was searching for hours and ran across something similar but I did not understand the coding. Now that I see your example all is now clear!!! Thanks again!!!


Report •

Report •
Related Solutions

Ask Question