A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

how do I make multiple "if" statements



 
 
Thread Tools Display Modes
  #1  
Old October 5th, 2005, 05:52 PM
AccessNewbie
external usenet poster
 
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  
Old October 5th, 2005, 06:16 PM
Roger Govier
external usenet poster
 
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  
Old October 5th, 2005, 06:30 PM
George Gee
external usenet poster
 
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  
Old October 6th, 2005, 12:18 AM
Gary''s Student
external usenet poster
 
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!

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I make multiple room scheduler (Excel) 15 minute increments? Viv_Martin General Discussion 3 October 5th, 2005 01:17 AM
Print multiple copies and change id to make each page unique Brian K. Sheperd Setting Up & Running Reports 4 November 15th, 2004 04:33 PM
how do i make multiple footnote entries in excel T Farmer Worksheet Functions 2 September 9th, 2004 11:27 PM
Make multiple new sheets at the same time? davesearle General Discussion 8 September 7th, 2004 06:04 PM
multiple sql statements in OLE DB command Jerry Nettleton Running & Setting Up Queries 2 June 18th, 2004 04:58 AM


All times are GMT +1. The time now is 12:22 PM.


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