If formula not giving expected result

Island Gryl

New Member
Joined
Jan 11, 2011
Messages
22
Office Version
  1. 365
Platform
  1. Windows
=IF(U3>0,U3-H3,U3) Result is -33 Expecting 0

Where U3 is 0 (the result of a Vlookup with no result)
Where H3 is 33


This formula works when U3 is not zero and returns this negative result when it is.
I'd like to have it give me the difference of U - H (U is always greater than H except when it's zero)

Hoping this is simple enough that my skipping the example create is ok.

Appreciate the practiced eye!
 

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.
What is the formula in U3? How do you know it's exactly 0? Is it possible that the value is something like 0.00000001 but you are not showing the decimal part in the cell?
 
Upvote 0
Here is how it works for me. What is it that you are expecting to be different?
URL_Maker.xlsm
HUV
3331-32
43300
533-1-1
Sheet2
Cell Formulas
RangeFormula
V3:V5V3=IF(U3>0,U3-H3,U3)
 
Upvote 0
In reply to first question, what is the formula in U =IFERROR(VLOOKUP(K3, Orders!$B$2:$L$990, 11, 0),"0")
It is getting an email address in K3 and then looking for a match in the Orders Tab, if there is a match place the value in U (which is currency USD) if no match put 0.
So in answer to the second question, it shouldn't be anything other than a zero...

In answer to Stephen, I kinda new something like that was in there but didn't know how to get there. That is a very simple approach and it works!

The whole effort is to get a total of currency exchange on Months Sales Orders as reported on our Shopify Platform (we are CDN based so Shopify reports everything in CDN) we have recently opened a US$ deposit account for our US Orders so I need to convert back these orders that are paying out in USD to balance the payouts and record the FX.

Thanks to Stephen for the elegant simple fix!
 
Upvote 0
That explains the funny result. "0" (text) is not the same as 0 (numeric).

So if U3 = "0", then the test U3>0 in your formula below will be TRUE:

=IF(U3>0,U3-H3,U3)

And U3 - H3 will coerce the U3 value "0" to numeric 0.
 
Upvote 0
So use this

Excel Formula:
=IFERROR(VLOOKUP(K3, Orders!$B$2:$L$990, 11, 0),0)
 
Upvote 0

Forum statistics

Threads
1,214,991
Messages
6,122,628
Members
449,095
Latest member
bsb1122

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