Odd Formula Wondering If Someone Understands It

MikeShoe

New Member
Joined
Oct 19, 2021
Messages
2
Office Version
  1. 2016
Platform
  1. Mobile
Hello,

I am taking over a spreadsheet that someone else created, and I came across the following formula:

IF(D71<0/C71<0,-(D71/C71),IF(C71<0/D71>0,-(D71/C71),D71/C71))

I understand what the person was attempting to resolve, however I am just curious what the portion of IF(D71<0/C71<0 means? To me this is a part of what should have been an AND or OR statement, but would like to know if someone can translate it?

Thank you in advance for your help!

~Mike
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
I dont think that part can produce anything other than FALSE or an error. Assuming C71 and D71 are numeric then:

=IF(D71<0/C71<0
=IF(D71<0<0
=IF(FALSE<0 or =IF(TRUE<0 both produce FALSE.
 
Upvote 0
Looking at it looks like just need

=ABS(D1/C1)
Yes this is the correct resolution. I was simply wondering what it was that was being attempted previously. It did not produce an error, but produced incorrect results.
 
Upvote 0
try using Formula Evaluate
What result do you require?

T202110a.xlsm
CDEF
70
71-5-10-2-2
72
4c
Cell Formulas
RangeFormula
E71E71=IF(D71<0/C71<0,-(D71/C71),IF(C71<0/D71>0,-(D71/C71),D71/C71))
F71F71=IF(AND(C71<0,D71<0),-(D71/C71),ABS(D71/C71))


T202110a.xlsm
CDEFG
71-5-10-2-22
725-10222
73
4c
Cell Formulas
RangeFormula
E71:E72E71=IF(D71<0/C71<0,-(D71/C71),IF(C71<0/D71>0,-(D71/C71),D71/C71))
F71:F72F71=IF(AND(C71<0,D71<0),-(D71/C71),ABS(D71/C71))
G71:G72G71=ABS(D71/C71)
 
Upvote 0
Solution

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