Help with a #Value! issue

Joined
Feb 24, 2011
Messages
10
Hello Friends~

With my Excel sheet I am trying to get rid of a #Value! error I am getting if there is no data in previous cells. Any ideas how to take care of this?

=IF(E15/-$C$35>0.8,"5",IF(E15/-$C$35>0.6,"4",IF(E15/-$C$35>0.4,"3",IF(E15/-$C$35>0.2,"2",IF(E15/-$C$35>0.0000000000001,"1","")))))

That is the formula...and it leaves the #Value! in other cells.

Thanks for the help in advance

fullview
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Ok, I've figured out one way to fix the issue. I went under Tools--->options and under the "View" tab, I unchecked Zero Values. I then entered a zero into the entire column. This column was the basis for which the rest of the formulas were based.

Example: E4= C4*D4. C4 also plays a role in other formulas such as C4*G4.

By entering a 0 in C4---it removes all of the #Value! errors I was receiving.

Although a cleaner solution would be more ideal.
 
Upvote 0
You can wrap the formula in an If():

=IF(OR(SUM(E15), SUM(C35)=0),"", ,IF(E15/-$C$35>0.8,"5",IF(E15/-$C$35>0.6,"4",IF(E15/-$C$35>0.4,"3",IF(E15/-$C$35>0.2,"2",IF(E15/-$C$35>0.0000000000001,"1",""))))),"")

Or (AlphaFrog's formula):
=IF(OR(SUM(E15), SUM(C35)),"", LOOKUP(E15/-$C$35 +0.0000000000001, {0,0.2,0.4,0.6,0.8},{1,2,3,4,5}))

The SUM() will test if cells have zero or if they contain text (sum evaluates to zero for text).

-----------------
Note:
You can use custom formatting or conditional formatting to hide zeros (without changing the application settings).

Also, E4 * C4 will be the same if C4 has a zero or is blank (but not if it is a "" value). Multiplication and addition will treat empty cells as zero.

ξ
 
Last edited:
Upvote 0
Try
Code:
=IFERROR(IF(E15/-$C$35>0.8,"5",IF(E15/-$C$35>0.6,"4",IF(E15/-$C$35>0.4,"3",IF(E15/-$C$35>0.2,"2",IF(E15/-$C$35>0.0000000000001,"1",""))))),"")
 
Upvote 0
This uses your original formula but first tests if E15/-$C$35 produces any error.

Code:
=[COLOR="Red"]IF(ISERROR(E15/-$C$35),"",[/COLOR]
  IF(E15/-$C$35>0.8,"5",IF(E15/-$C$35>0.6,"4",
  IF(E15/-$C$35>0.4,"3",IF(E15/-$C$35>0.2,"2",
  IF(E15/-$C$35>0.0000000000001,"1","")))))[COLOR="Red"])[/COLOR]
 
Upvote 0

Forum statistics

Threads
1,215,385
Messages
6,124,626
Members
449,174
Latest member
Anniewonder

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