My First Question

Apexwolf

New Member
Joined
Jun 18, 2024
Messages
9
Office Version
  1. 365
Platform
  1. Windows
I am relatively new to Excel (using it for the past year) and have an issue I cannot seem to find a solution to. "=IF((H12-H14)*1000<0,0,(H12-H14)*1000)" I have this equation in a cell when I use one of my dial indicators at work, the problem is I have a second dial indicator that reads backwards. So instead of having to manually flip both H12-H14 is there a way I can tell this cell which dial indicator I'm using and then it uses the correct formula? Let me know if my question is not clear. Thank you.
 
OK, That formula is fantastic, works perfect. The =IF formula @dried1011 suggested only returns #NAME?. Here is what I tried.
Bulk for export from Benton & Winchester.xlsx
GHIJ
10SPECIMEN INUNDATION
11distilled water for 24 h or expantion rate < 0.0002 in./hHeight (in)Time (h:m)Date
12Initial0.282018:4106/17/24
13Reading0.26109:1006/18/24
14Final Reading0.2150
15EI (measured)#NAME?
EI FORM
Cell Formulas
RangeFormula
H15H15=IF(J15=A,(MAX((H12-H14)*1000,0)),(MAX((H14-H12)*1000,0)))
Yes, what I suggested was a very general idea of the logic behind the formula, not specific syntax. That would be why you are getting the error. As Joe has shown, the "A" should be in double quotes.
 
Upvote 1

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
That is because it does not recognize A here:
Excel Formula:
=IF(J15=A

If you are checking for a value of "A", it needs to be inside double-quotes, i.e.
Excel Formula:
=IF(J15="A"

Literal values always needs to go between double-quotes.
Otherwise, it thinks it is a function or range reference.
AHHH. OK. Nice thank you. Works perfect. Man am I glad I found this community.

Bulk for export from Benton & Winchester.xlsx
GHIJ
10SPECIMEN INUNDATION
11distilled water for 24 h or expantion rate < 0.0002 in./hHeight (in)Time (h:m)Date
12Initial0.282018:4106/17/24
13Reading0.26109:1006/18/24
14Final Reading0.261011:1806/18/24
15EI (measured)21a
EI FORM
Cell Formulas
RangeFormula
H15H15=IF(J15="A",(MAX((H12-H14)*1000,0)),(MAX((H14-H12)*1000,0)))
 
Upvote 0
I think you should be able to do
Excel Formula:
=ABS(H12-H14)*1000
 
Upvote 0
I don't see the point of J15="A" or the 0.

Excel Formula:
=MAX(H12-H14,H14-H12)*1000
The point of J15="A" is because OP uses 1 of 2 different measuring devices, and which one determines if it's H12-H14 or H14-H12. I don't think checking which one is larger is what OP is after, except only using values greater than or equal to 0.
 
Upvote 0
He has 2 different sets of numbers, watch this. Not the same thing

Book1
HIJKLM
121450000
13
1419
15A
16
Sheet1
Cell Formulas
RangeFormula
L12L12=ABS(H12-H14)*1000
M12M12=MAX((IF(J15="A",H12-H14,H14-H12))*1000,0)
 
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,224
Members
452,620
Latest member
dsubash

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