If statement to have two different cells changed

visitor13

New Member
Joined
Mar 13, 2023
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi excel experts,

I am learning excel. I have the following formula that doesn't work as planned yet (only 50 %).

=IF(P8="", "SHORT...", IF(P8>0, "SHORT CALL", IF(R8>0, "SHORT PUT")))

The cell N8 shows SHORT... this is okay. When I enter a number in cell P8 (must be greater than 0) the cell N8 changes to SHORT CALL. This works fine, too.
When I enter a number in cell R8 (again, must be greater than 0) the cell N8 should/must change to SHORT PUT, but it doesn't.

Another question... would it be also possible to have cell N8 changed to SHORT STRANGLE if both cells (P8 and R8) have a number (bigger than 0) entered? If yes, how can this be done?

Thank you, visitor13
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Hi,

The best "Option" is to have a reference table and forget all nested ifs ...and use a simple VLookup()
 
Upvote 0
Hi,

The best "Option" is to have a reference table and forget all nested ifs ...and use a simple VLookup()
Hi James006,

Thank you for your message and suggestion. I applied some changes and the new formula looks like this...

=IF(P8>0, "SHORT CALL", IF(R8>0, "SHORT PUT", "SHORT..."))

SHORT... SHORT CALL and SHORT PUT work perfectly with this new formula. Now I am trying to get the following done... to have cell N8 changed to SHORT STRANGLE when entering a number in both cells (P8 and R8). Working on it...*

*I want to try this with nested ifs, too. If anyone has an idea how to do it, please let me know.

Thank you, visitor13
 
Upvote 0
to have cell N8 changed to SHORT STRANGLE when entering a number in both cells (P8 and R8).
Is this what you want?
Excel Formula:
=IF(P8*R8>0,"SHORT STRANGLE",IF(P8>0, "SHORT CALL", IF(R8>0, "SHORT PUT", "SHORT...")))

*I want to try this with nested ifs, too. If anyone has an idea how to do it, please let me know.
My formula and yours are already 'nested IF' formulas. :)
 
Upvote 0
Solution
Hi Peter_SSs,

Thank you for your message and suggestion. Your solution works like a charm and is exactly what I was looking for.

Thanks again, visitor13
 
Upvote 0
You're welcome. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,214,950
Messages
6,122,438
Members
449,083
Latest member
Ava19

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