Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 37
Default If Then assistance...

I'm just not computing this simply in my mind. I want a formula/macro that
will check cell F2 for multiple terms (blue, red, green, yellow) then input a
number in cell G2 to reflect that color (blue = 1, red = 2, green = 3, yellow
= 4).

I have not had enough coffee today obviously because this seems like a
simple task and I'm just not grasping it. Excel 07 also.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default If Then assistance...

I think you are looking for this...

=MATCH(F2,{"blue","red","green","yellow"},0)

Rick


"Murph" wrote in message
...
I'm just not computing this simply in my mind. I want a formula/macro that
will check cell F2 for multiple terms (blue, red, green, yellow) then
input a
number in cell G2 to reflect that color (blue = 1, red = 2, green = 3,
yellow
= 4).

I have not had enough coffee today obviously because this seems like a
simple task and I'm just not grasping it. Excel 07 also.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,047
Default If Then assistance...

Hy Murph,

if you have on cell F2 the text blue, red, yeloow etc

you can use +if(f2="Blue",1,if(f2="red",2,if(f2="green",3,if(f 2="yellow",4))))

if you are looking fot a value regarding the pattern of the cell, look at a
Chip Pearson page at:
http://www.cpearson.com/excel/SortByColor.htm

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Murph" escreveu:

I'm just not computing this simply in my mind. I want a formula/macro that
will check cell F2 for multiple terms (blue, red, green, yellow) then input a
number in cell G2 to reflect that color (blue = 1, red = 2, green = 3, yellow
= 4).

I have not had enough coffee today obviously because this seems like a
simple task and I'm just not grasping it. Excel 07 also.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default If Then assistance...

The VLOOKUP function will do this nicely. Create a table, listing the colors
down one column and the corresponding numbers in the cells in the column just
to the right of it. Name the table "MyColors". Then put this formula in
cell G2

=VLOOKUP(F2,MyColors,2,FALSE)

Vaya con Dios,
Chuck, CABGx3




"Murph" wrote:

I'm just not computing this simply in my mind. I want a formula/macro that
will check cell F2 for multiple terms (blue, red, green, yellow) then input a
number in cell G2 to reflect that color (blue = 1, red = 2, green = 3, yellow
= 4).

I have not had enough coffee today obviously because this seems like a
simple task and I'm just not grasping it. Excel 07 also.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default If Then assistance...

Maybe
=LOOKUP(E2,{"Blue","Red","Green","Yellow"},{1,2,3, 4})
Mike


"Murph" wrote:

I'm just not computing this simply in my mind. I want a formula/macro that
will check cell F2 for multiple terms (blue, red, green, yellow) then input a
number in cell G2 to reflect that color (blue = 1, red = 2, green = 3, yellow
= 4).

I have not had enough coffee today obviously because this seems like a
simple task and I'm just not grasping it. Excel 07 also.

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default If Then assistance...

This formula returns the number index of the color in F2
.....or zero if F2 is either blank or contains invalid text:

G2: =MAX(COUNTIF(F2,{"blue","red","green","yellow"})*{ 1,2,3,4})

Does that help?
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)

"Murph" wrote in message
...
I'm just not computing this simply in my mind. I want a formula/macro that
will check cell F2 for multiple terms (blue, red, green, yellow) then
input a
number in cell G2 to reflect that color (blue = 1, red = 2, green = 3,
yellow
= 4).

I have not had enough coffee today obviously because this seems like a
simple task and I'm just not grasping it. Excel 07 also.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
=IF(AND) ASSISTANCE VAN GOGH Excel Worksheet Functions 3 June 21st 06 04:18 AM
Need some assistance mjman15 Excel Worksheet Functions 0 November 10th 05 10:44 PM
Assistance please? http:// Excel Worksheet Functions 7 July 6th 05 08:16 PM
Need some assistance N Schei Charts and Charting in Excel 2 March 24th 05 07:58 PM
I Need VBA Assistance for EOF Brent E Excel Discussion (Misc queries) 4 February 26th 05 06:00 PM


All times are GMT +1. The time now is 04:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"