If statement for 4 results

Woofy_McWoof_Woof

Board Regular
Joined
Oct 7, 2016
Messages
60
Office Version
  1. 365
Platform
  1. Windows
Hi

I am attempting to do an If statement that can give 4 potential results depending on whether the Volume or Value is positive or negative.

For instance in the example below (row 3) I have sold 4.9 units at a price lower than i assumed it would be which cost me -12.84. However, the next day (row 4) I sell 5.5 units at a positive delta price which gives me a benefit of 15.50.
In row 5 i bought 1.7 units at a cheaper rate than i thought i would which gives me a benefit of 8.95 and finally in row 6 i bought 1 unit but it cost me more than I thought it would so it results in a loss of 6.5.

I am able to do an if statement on one way i.e. all gain or all loss but i can't seem to crack it where both gains and benefits are included together.

Any help would be most appreciated.

Thank you.

Row 1Col BCol CCol D
Row 2VolumeValueResult
Row 3
4.90​
-12.84​
Loss
Row 4
5.50​
15.50​
Gain
Row 5
-1.70​
-8.95​
Gain
Row 6
-1.00​
6.50​
Loss
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Wow, so simple thank you. I was trying to over complicate things. You have saved me a lot of work :)
 
Upvote 0
try

=IF(B3>0,IF(C3>0,"Gain","Loss"),IF(C3<0,"Gain","Loss"))
 
Upvote 0

Forum statistics

Threads
1,213,539
Messages
6,114,221
Members
448,554
Latest member
Gleisner2

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