Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
doon
 
Posts: n/a
Default HELP| populate cell with particular value based on multiple condit

i am not sure how to phrase this, but this is what i am after...

I want to populate cell B1 with a particular value based on multiple
conditions in cell A1. I need cell B1 to do the following:

- If cell A1 = "Dog" then the value of B1 should equal the value in cell E21
- If cell A1 = "Cat" then the value of B1 should equal the value in cell F21
- If cell A1 = "Mouse" then the value of B1 should equal the value in cell G21

how the heck do i do this? is this even possible?

many thanks,
doon
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK
 
Posts: n/a
Default HELP| populate cell with particular value based on multiple condit

Try this in B1:

=IF(A1="Dog",E21,IF(A1="Cat",F21,IF(A1="Mouse",G21 ,"Not specified")))

The phrase "Not specified" is returned if none of the criteria are met.
There is a limit of 7 to the number of IF statements you can "nest" in
this way - if you have more criteria then there are other ways of
achieving what you require.

Hope this helps.

Pete

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default HELP| populate cell with particular value based on multiple condit


Try this formula in B1

=INDEX(E21:G21,MATCH(A1,{"Dog","Cat","Mouse"},0))


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=511528

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
doon
 
Posts: n/a
Default HELP| populate cell with particular value based on multiple co

hi pete,

i tried this, but get an error. excel highlights this part of the formula:
""Dog",E21,IF"

any thoughts?
doon
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
doon
 
Posts: n/a
Default HELP| populate cell with particular value based on multiple co

hi there,

tried this suggestion as well. excel seems to have an issue with this part
of the formula: "G21,MATCH"

any thoughts?
d


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default HELP| populate cell with particular value based on multiple condit


Hi, doon

both my suggestion and Pete's work for me :)

are you using those exact formulas?


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=511528

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
doon
 
Posts: n/a
Default HELP| populate cell with particular value based on multiple co

got it to work!

i used pete's first. i had to change all of the commas to semicolons and
then it all worked.

my looks like this:
=IF(B5=B31;C32;IF(B5=E31;F32;IF(B5=H31;I32;"Not specified")))

i am referencing other cells to give me the dog, cat, mouse terms in my
example. somehow, the semicolons seem strange, but this was the magic fix.

thanks again to you both!
doon

p.s. just about to try the second suggestion and will try applying the same
"fix" there as well...
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kevin Vaughn
 
Posts: n/a
Default HELP| populate cell with particular value based on multiple co

It's just that your regional settings are different than those of the people
who supplied you answers. I use commas, as I believe do most people who are
in the United States, but for some reason, apparently, different countries or
regions use the semicolon for delimiter. I don't remember ever reading that
some regions use other than those two.
--
Kevin Vaughn


"doon" wrote:

got it to work!

i used pete's first. i had to change all of the commas to semicolons and
then it all worked.

my looks like this:
=IF(B5=B31;C32;IF(B5=E31;F32;IF(B5=H31;I32;"Not specified")))

i am referencing other cells to give me the dog, cat, mouse terms in my
example. somehow, the semicolons seem strange, but this was the magic fix.

thanks again to you both!
doon

p.s. just about to try the second suggestion and will try applying the same
"fix" there as well...

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
How do I set up multiple logical conditions on one result cell Ring eye Excel Worksheet Functions 1 January 12th 06 07:31 PM
validate input of cell A1 to either 8 or 0 based on cell B > 0 Captnsvo23t Excel Worksheet Functions 1 August 30th 05 09:57 PM
Cell Value Updated based cell input DC Excel Discussion (Misc queries) 2 August 17th 05 11:07 PM
Cell color based upon cell value My View Excel Discussion (Misc queries) 11 July 6th 05 03:59 AM
generate multiple rows based on cell value Theresa Excel Worksheet Functions 0 May 25th 05 11:18 PM


All times are GMT +1. The time now is 01:48 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"