How can I do multiple IF's?

beenay

New Member
Joined
Oct 9, 2002
Messages
10
I have set up a spreadsheet with 8 radio buttons. Depending on which button is clicked, a number (1 through 8) is returned in a specific cell. If button 1 is pressed, I need another cell to return a "0" (zero). If 2 is pressed, I also need a "0". If 3 is pressed I need a "5". If 4, I need a "10". Etc. Etc. Etc. How can I use multiple IF statements in a formula for one cell?
This message was edited by beenay on 2002-10-10 14:02
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
You need to look at the help for nested IF statements, maximum of 7 IF statements though

To give you an idea this will return 0 if Cell A1 is 1 or 2 (or zero or a negative number) and 5 if CellA1 is 3

=IF(A1<=2,0,IF(A1=3,5,(next IF here)))

You can add 5 more IFs which should just be enough if you use the less than 2 option to cover your first two buttons
This message was edited by royUK on 2002-10-10 14:14
This message was edited by royUK on 2002-10-10 14:15
 
Upvote 0
=IF(A1=1,"0",IF(A1=2,"0",IF(A1=3,"5",IF(A1=4,"10",IF(A1=5,"15",IF(A1=6,"20",IF(A1=7,"25",IF(A1=8,"30",))))))))

try this.....make sure you count the brackets at the end correctly, works fine on EXCEL XP!
This message was edited by B_2 on 2002-10-10 14:17
This message was edited by B_2 on 2002-10-10 14:19
 
Upvote 0
Yikes!! Simply use...

=CHOOSE(A1,"0","0","5","10")
This message was edited by Mark W. on 2002-10-10 14:22
 
Upvote 0
i have just checked Help and it states:
Up to seven IF functions can be nested as value_if_true and value_if_false arguments to construct more elaborate tests. See the last of the following examples.
This might be different in ExcelXP
 
Upvote 0
Hi Mark

Just checked your CHOOSE function- brilliant. There's always something new to learn with Excel

Roy
This message was edited by royUK on 2002-10-10 14:55
 
Upvote 0

Forum statistics

Threads
1,222,175
Messages
6,164,397
Members
451,889
Latest member
invalidlabel

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top