if- then statements

P

Paul

hi there. i cant figure out how to do an "if - then" type of function. If A1=
23 then B2= Red
or,
if A1= Blue then B1= Color

wheere i have a list of datat that can be chosen for A1 and then a
corresponding list of data for B2. the B2 cell will be automatically
populated once i fill in A1.

am i asking this right? does anyone know or have a moment to help? thanks!!!!
 
P

Pete_UK

You can't use a formula to set the colour in a cell directly - you
have to use Conditional Formatting (from the Format menu) to do that,
or use a macro. If you describe your problem further then I could
elaborate.

Hope this helps.

Pete
 
S

Susan

you can't do this with a formula. you have to do it with conditional
formatting.
select cell B2 & choose Format, Conditional
select "Formula Is" from the 1st dropdown box.
in the formula row, type:
=A1=23
then choose your formatting.
hope that helps
:)
susan
 
L

Luke M

I don't think my colleagues fully read your question.

Assuming you have a table somewhere, (Say A10:B20) where A10:A20 list
everything A1 could be, and B1:B20 lists the corresponding value you want B2
to be. Make sure the list is sorted alphabetically (by A Column)

Formula for B2 then is:
=LOOKUP(A1,A10:A20)
 
P

Paul

thank you so much for the help buddy!

Luke M said:
I don't think my colleagues fully read your question.

Assuming you have a table somewhere, (Say A10:B20) where A10:A20 list
everything A1 could be, and B1:B20 lists the corresponding value you want B2
to be. Make sure the list is sorted alphabetically (by A Column)

Formula for B2 then is:
=LOOKUP(A1,A10:A20)
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*
 
P

Paul

thank you so much!!!

Susan said:
you can't do this with a formula. you have to do it with conditional
formatting.
select cell B2 & choose Format, Conditional
select "Formula Is" from the 1st dropdown box.
in the formula row, type:
=A1=23
then choose your formatting.
hope that helps
:)
susan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top