Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
LilJazzyLady
 
Posts: n/a
Default Formula Question - HELP

I posted a similiar question before, but I don't think I was clear. Here's
what I'm trying to do:

In colum B, each corresponding cell has a number (ex: B2 has a 1, B3 has a
4, etc). In Column D is where I want to return the text value. I need the
formula to search the cell in Column B and if it finds a 1, to return the
value "Blue," a 2 to return "Red," a 4 to return "Yellow" and so forth. An
If statement doesn't work because I have more than 7 conditions. What else
can I do here?

Hope that's clear.

Thanks!!
  #2   Report Post  
Posted to microsoft.public.excel.misc
Elkar
 
Posts: n/a
Default Formula Question - HELP

I would suggest creating a table on a seperate sheet, then using the VLOOKUP
function to retrieve your values.

So, on Sheet2, you'd have a table like this:

ColA ColB
1 Blue
2 Red
3 Purple
4 Yellow
etc...

Back on Sheet1, use this formula in D2:

=VLOOKUP(B2,Sheet2!$A$1:$B$100,2,FALSE)

Copy the formula down column D as needed.

HTH,
Elkar


"LilJazzyLady" wrote:

I posted a similiar question before, but I don't think I was clear. Here's
what I'm trying to do:

In colum B, each corresponding cell has a number (ex: B2 has a 1, B3 has a
4, etc). In Column D is where I want to return the text value. I need the
formula to search the cell in Column B and if it finds a 1, to return the
value "Blue," a 2 to return "Red," a 4 to return "Yellow" and so forth. An
If statement doesn't work because I have more than 7 conditions. What else
can I do here?

Hope that's clear.

Thanks!!

  #3   Report Post  
Posted to microsoft.public.excel.misc
Mikeopolo
 
Posts: n/a
Default Formula Question - HELP


Hi:

In another part of the worksheet, create a list with 2 columns:

1 Blue
2 Red
3 Green
etc
and for preference have this range sorted on the first column

Give this range a name, eg colours

Then in each cell in column D type:
=vlookup(B1,colours,2,false)

(In this formula, B1 is the source value, colours is the range you
created above, 2 means column 2 of that range, and false means that the
values in column 1 of the lookup table are not necessarily sorted)

This should return the appropriate colour to the cell.

Regards
Mike


--
Mikeopolo
------------------------------------------------------------------------
Mikeopolo's Profile: http://www.excelforum.com/member.php...o&userid=18570
View this thread: http://www.excelforum.com/showthread...hreadid=537395

  #4   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default Formula Question - HELP

Setup a table, 2 columns by n rows, in M1:N10 say, with values of
1 Blue
2 Red
4 Yellow
etc

Then use

=VLOOKUP(B2,$M$1:$N$10,2,False)

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"LilJazzyLady" wrote in message
...
I posted a similiar question before, but I don't think I was clear.

Here's
what I'm trying to do:

In colum B, each corresponding cell has a number (ex: B2 has a 1, B3 has a
4, etc). In Column D is where I want to return the text value. I need

the
formula to search the cell in Column B and if it finds a 1, to return the
value "Blue," a 2 to return "Red," a 4 to return "Yellow" and so forth.

An
If statement doesn't work because I have more than 7 conditions. What else
can I do here?

Hope that's clear.

Thanks!!



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
Formula Question Formula Question Excel Discussion (Misc queries) 2 April 23rd 06 12:00 AM
Excel formula question bb Excel Discussion (Misc queries) 3 April 20th 06 03:11 AM
Formula Question Marcus Feldmore Excel Worksheet Functions 1 November 11th 05 03:47 PM
I have a question regarding countif formula. Fahad Farid Ansari Excel Worksheet Functions 6 October 1st 05 11:57 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM


All times are GMT +1. The time now is 07:04 AM.

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"