Return total instead of value if the lookup is showing zero

Jamesorme

New Member
Joined
Jun 13, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I have a lookup in column G & H, when the value us zero in column G my simple sum in column L returns #value! instead of the total. What do I need to add to fix this please?
 

Attachments

  • Example.PNG
    Example.PNG
    10 KB · Views: 12

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
I am guessing one of your apparently "blank" cells referenced in the formula is not actually blank, but a single space or "", which is considered text, which will result in a #VALUE error when used in addition or subtraction. Change your formulas so the return 0 instead of a space or "" and it should work.

If you do not wish to see the zeroes, you can always hide them with Custom Formatting or Conditional Formatting.
 
Upvote 0
As @Joe4 pointed out its better to clean up the data. If for some reason that doesn't work for you, then this would get you out of trouble:
Excel Formula:
=N(H7)-N(G7)+N(K7)-N(J7)
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,209
Members
453,022
Latest member
RobertV1609

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