Getting #DIV/0! in fields when other fields are empty

  • Thread starter TheContractorsGroup
  • Start date
T

TheContractorsGroup

Version: 2004
Operating System: Mac OS X 10.5 (Leopard)
Processor: Intel

Hello!

I have created a form:

A = Total Hours (worked on the construction project)
"A1"= Male
"A2" = Female

B = Black (employees worked on the construction project)
"B1"= Male
"B2" = Female

C = Hispanic (employees worked on the construction project)
"C1"= Male
"C2" = Female

D = Asian Pacific Islander (employees worked on the construction project)
"D1"= Male
"D2" = Female

E = American Indian Aleut (employees worked on the construction project)
"E1"= Male
"E2" = Female

F = White (employees worked on the construction project)
"F1"= Male
"F2" = Female

G = Percent Min(orities) Hours of Total (worked on project)
"G1"= Male
"G2" = Female

I have to add cells B1, C1, D1, E1, F1 and then divide by A1 and the result (in %) goes into G1. My formula used:

=SUM(B1+C1+D1+E1+F1)/(A1)

The formula is working great and the correct % automatically populates the cell G1 but my problem is...

When there are no values entered in B1, C1, D1, E1, F1 or A1, then G1 shows #DIV/0!

I don't want #DIV/0! to show, I would prefer that the G1 cell remain blank until and if the other cells are filled in.

Is it possible to make the #DIV/0! go away?

Thank you very much for your time and any help!
Diane
 
B

Bob Greenblatt

Version: 2004
Operating System: Mac OS X 10.5 (Leopard)
Processor: Intel

Hello!

I have created a form:

A = Total Hours (worked on the construction project)
"A1"= Male
"A2" = Female

B = Black (employees worked on the construction project)
"B1"= Male
"B2" = Female

C = Hispanic (employees worked on the construction project)
"C1"= Male
"C2" = Female

D = Asian Pacific Islander (employees worked on the construction project)
"D1"= Male
"D2" = Female

E = American Indian Aleut (employees worked on the construction project)
"E1"= Male
"E2" = Female

F = White (employees worked on the construction project)
"F1"= Male
"F2" = Female

G = Percent Min(orities) Hours of Total (worked on project)
"G1"= Male
"G2" = Female

I have to add cells B1, C1, D1, E1, F1 and then divide by A1 and the result
(in %) goes into G1. My formula used:

=SUM(B1+C1+D1+E1+F1)/(A1)

The formula is working great and the correct % automatically populates the
cell G1 but my problem is...

When there are no values entered in B1, C1, D1, E1, F1 or A1, then G1 shows
#DIV/0!

I don't want #DIV/0! to show, I would prefer that the G1 cell remain blank
until and if the other cells are filled in.

Is it possible to make the #DIV/0! go away?

Thank you very much for your time and any help!
Diane
I would change your formula to:
=if(a1=0,"",sum(b1:f1)/a1)
 
T

TheContractorsGroup

Thank you so much Bob!

It worked! Although I'm sure you knew it would! :)

Thank you again and have a great day!
Diane
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top