changing text to text according rules

S

spolk

Hi I've have a following problem; i want to code SB501 to be appeare
into column B if there is a text "AS" in column A.
So the rule is: IF cell A2= "AS" then insert text "SB501" into cell B2

Any ideas how to do this with or without macro?

A B
Standart Soil_Body
AS SB501
HtS SB50
 
F

Frank Kabel

Hi
if column B is currently empty insert the following in B1
=IF(A1="AS","SB501","")
and copy this down
 
M

Mark Graesser

Hi spolk
If you have just the one code then you can use the IF statement that Frank supplied

From your example it looks like you might have several codes. If so, look into using the VLOOKUP function. You can create a table with the text and codes and then use the VLOOKUP function to return the correct code based on the text

Good Luck
Mark Graesse
[email protected]
Boston MA

----- spolk > wrote: ----

Hi I've have a following problem; i want to code SB501 to be appeare
into column B if there is a text "AS" in column A
So the rule is: IF cell A2= "AS" then insert text "SB501" into cell B

Any ideas how to do this with or without macro

A
Standart Soil_Bod
AS SB50
HtS SB50
 
Top