help with simple formula

Smithb

New Member
Joined
Feb 7, 2023
Messages
2
Office Version
  1. 2010
Platform
  1. Windows
Hi there, my spreadsheet has 5 columns, with headings.. A-date, B-enter long, C-enter short, D-exit, e-%. I would like to create a formula to calculate % in column e. If column a-date is blank, e remains blank. If a date is listed in column a, and a number is listed in b&D, e = ((d-b)/d), if B is blank and a number is listed in C&D, e=((d-c/d). I would like to create a formula that will combine these if/and scenarios and give me one result in column e. There will always be only one number in B or C. Thanks.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Try this:

Excel Formula:
=IF(A3="","",(D3-IF(ISBLANK(B3),C3,B3))/D3)
 
Upvote 0
T202302.xlsm
ABCDEF
1DateLongShortExitPercentage
27-Feb-234010060%60%
1b
Cell Formulas
RangeFormula
A2A2=TODAY()
E2E2=IF(A2="","",(D2-MAX(B2:C2))/D2)
F2F2=IF(A2="","",IF(AND(B2<>"",D2<>""),(D2-B2)/D2,IF(AND(C2<>"",D2<>""),(D2-C2)/D2)))
 
Upvote 0
Solution

Forum statistics

Threads
1,214,833
Messages
6,121,861
Members
449,052
Latest member
Fuddy_Duddy

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