Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
AccessNewbie
 
Posts: n/a
Default how do I make multiple "if" statements

I want to do something like this:
if cell D4 is "23" then "45"
or
if cell D4 is "24" then "48"
or
if cell D4 is "26" then "97"
etc.
So the formula in one cell is looking for the value in another cell and
returning the appropriate response.

Thanks!
  #2   Report Post  
Roger Govier
 
Posts: n/a
Default

Hi

=IF(D4=23,45,IF(D4=24,48,IF(D4=26,97,"")))

The formula returns Null "" if the value in D4 is not equal to any of
the values posted.
Change the "" to whatever you would like in this case.

Regards

Roger Govier



AccessNewbie wrote:

I want to do something like this:
if cell D4 is "23" then "45"
or
if cell D4 is "24" then "48"
or
if cell D4 is "26" then "97"
etc.
So the formula in one cell is looking for the value in another cell and
returning the appropriate response.

Thanks!


  #3   Report Post  
George Gee
 
Posts: n/a
Default

One way:

Type in the cell where you wish to see the result:

=IF(D4=23,45,IF(D4=24,48,IF(D4=26,97)))

However, you do not specify what happens if D4 is other than these three
values!

George Gee


AccessNewbie wrote:
I want to do something like this:
if cell D4 is "23" then "45"
or
if cell D4 is "24" then "48"
or
if cell D4 is "26" then "97"
etc.
So the formula in one cell is looking for the value in another cell
and returning the appropriate response.

Thanks!



  #4   Report Post  
Gary''s Student
 
Posts: n/a
Default

=(D4=23)*45+(D4=24)*48+(D4=26)*97

No IFs required.
--
Gary's Student


"AccessNewbie" wrote:

I want to do something like this:
if cell D4 is "23" then "45"
or
if cell D4 is "24" then "48"
or
if cell D4 is "26" then "97"
etc.
So the formula in one cell is looking for the value in another cell and
returning the appropriate response.

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
Adding multiple worksheets Craig Excel Worksheet Functions 1 July 6th 05 07:21 PM
How to: Multiple "if" statements? Hosh New Users to Excel 2 June 29th 05 02:20 PM
Nested IF statements John Simons Excel Worksheet Functions 14 February 16th 05 06:17 AM
Can I get the mode, min, and max with multiple criteria? BobT Excel Discussion (Misc queries) 1 February 15th 05 03:20 AM
How do I set up multiple if statements in Excel? LKraft0318 Excel Worksheet Functions 2 February 9th 05 09:53 PM


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