MrExcel Publishing
Your One Stop for Excel Tips & Solutions

If formula help


Posted by Eric S on February 01, 2001 3:26 PM

I need to make a nested if statement that modifies other cells based on what the user enters: Example:

If
__cell a5=20
_____let a4=10
______let a3=10
else
If
__cell a5=10
_____let a4=5
______let a3=5
endif

Any Suggestions

Thanks,
Eric


Posted by Mark W. on February 01, 2001 3:40 PM

1. Select cells A3:A4
2. Type =IF(A5=20,10,IF(A5=10,5,""))
3. Press the Shift+Ctrl+Enter keys

Cells A3:A4 should now contain a single array
formula:

{=IF(A5=20,10,IF(A5=10,5,""))}

Posted by Mark W. on February 01, 2001 4:15 PM

By the way...

This can also be done without a nested if:

1. Select cells A3:A4
2. Type =IF(OR(A5={10,20}),A5/2,"")
3. Press the Shift+Ctrl+Enter keys

Cells A3:A4 should now contain a single array
formula:

{=IF(OR(A5={10,20}),A5/2,"")}

Posted by Eric S on February 01, 2001 5:17 PM

Re: By the way... Thanks for quick response

Thanks for the quick response. I will try out the entire spreadsheet that I need to do and let you know how it goes.

I didn't expect a response that fast, keep up the great work.

Eric


Posted by Eric S on February 01, 2001 8:51 PM

Re: By the way... It works perfectly

It worked exactly as I needed it too. Thanks for helping me out.

Eric