Text box has no value but is not null?

ARW17

Board Regular
Joined
Oct 31, 2016
Messages
109
I have an equation on a subform to add up the number of vacation days scheduled. The equation is
=Sum([Duration by Day])

It works if the person has a vacation day scheduled, but if they don't I'm getting #Error.

I tried to fix it by writing =iif(isnull(Sum([Duration by Day]))=true, 0, Sum([Duration by Day]), but this still results in an error.

How can this text box have no value, but not be null?

Please help me fix this error:)
 
I took your advice. It seems more like a workaround than a solution, but I like the result.

Thanks for your help in getting to the bottom of my issue! It does look cleaner for my form to only show the subforms with data.
 
Upvote 0

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
I took your advice. It seems more like a workaround than a solution, but I like the result.
I don't know if I would call it a workaround. That is usually how you want to program things - only show objects/sections that have data.
You cannot run a sum on data that does not exist. The error results because there is no data set. I don't think you can really tell the formula to ignore that fact.
 
Upvote 0

Forum statistics

Threads
1,223,249
Messages
6,171,031
Members
452,374
Latest member
keccles

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