#value!

FRED_SHEET

New Member
Joined
Oct 13, 2017
Messages
48
#VALUE! Error

I have an Excel spreadsheet in which a random number and a blank is generated for a Numerator for a Fraction in Column F and a Denominator is generated in Column G using a formula based on the number which is generated in Column F.

When I attempt to generate the resulting value for the fraction in Column I. I am getting an error message of #VALUE!.

What is wrong with the formula I am using?

I want 0.00000 to appear in Column I if Column F is blank.

Numerator Random Number Generator – Column F
=IF(RAND()<0.3," ",RANDBETWEEN(1,63))

Denominator Function – Column G
=IF(F9>=32,64,IF(F9>=16,32,IF(F9>=8,16,IF(F9>=4,8,IF(F9>=2,4,IF(F9>=1,2,0))))))

Decimal Equivalent Fraction (Numerator divided by Denominator) Formula – Column I
=IF(F12="",0,F12/G12)

Error Message
#VALUE!

I think the problem has to do with when I an generating a blank entry Column F. :confused:
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
if you wrap the formula with
=iferror(,0.0) and custom format the cell with 0.00000 i think
 
Upvote 0
Yes, you are inserting a space " " in the cell so Excel cannot perform the math operation and it will give a "VALUE error. You could wrap the whole formula in =IFERROR(your formula here , what do you want returned if an error)
 
Upvote 0
Or don't put a space in the cell put an empty string i.e.

IF(RAND()<0.3,"",RANDBETWEEN(1,63))
instead of
=IF(RAND()<0.3," ",RANDBETWEEN(1,63))

Excel Workbook
FGHI
1240.50000
2640.00000
318320.56250
4640.00000
5640.00000
612160.75000
717320.53125
829320.90625
957640.89063
1056640.87500
1143640.67188
12640.00000
1319320.59375
14120.50000
1557640.89063
1662640.96875
1710160.62500
1829320.90625
19120.50000
Sheet1
 
Upvote 0
Or don't put a space in the cell put an empty string i.e.

instead of

Sheet1

FGHI

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"><col style="width:64px;"></colgroup><tbody>
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]4[/TD]

[TD="align: right"]0.50000[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]2[/TD]

[TD="align: right"]64[/TD]

[TD="align: right"]0.00000[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]3[/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]32[/TD]

[TD="align: right"]0.56250[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]4[/TD]

[TD="align: right"]64[/TD]

[TD="align: right"]0.00000[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]5[/TD]

[TD="align: right"]64[/TD]

[TD="align: right"]0.00000[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]6[/TD]
[TD="align: right"]12[/TD]
[TD="align: right"]16[/TD]

[TD="align: right"]0.75000[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]7[/TD]
[TD="align: right"]17[/TD]
[TD="align: right"]32[/TD]

[TD="align: right"]0.53125[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]8[/TD]
[TD="align: right"]29[/TD]
[TD="align: right"]32[/TD]

[TD="align: right"]0.90625[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]9[/TD]
[TD="align: right"]57[/TD]
[TD="align: right"]64[/TD]

[TD="align: right"]0.89063[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]10[/TD]
[TD="align: right"]56[/TD]
[TD="align: right"]64[/TD]

[TD="align: right"]0.87500[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]11[/TD]
[TD="align: right"]43[/TD]
[TD="align: right"]64[/TD]

[TD="align: right"]0.67188[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]12[/TD]

[TD="align: right"]64[/TD]

[TD="align: right"]0.00000[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]13[/TD]
[TD="align: right"]19[/TD]
[TD="align: right"]32[/TD]

[TD="align: right"]0.59375[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]14[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]

[TD="align: right"]0.50000[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]15[/TD]
[TD="align: right"]57[/TD]
[TD="align: right"]64[/TD]

[TD="align: right"]0.89063[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]16[/TD]
[TD="align: right"]62[/TD]
[TD="align: right"]64[/TD]

[TD="align: right"]0.96875[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]17[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]16[/TD]

[TD="align: right"]0.62500[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]18[/TD]
[TD="align: right"]29[/TD]
[TD="align: right"]32[/TD]

[TD="align: right"]0.90625[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]19[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]

[TD="align: right"]0.50000[/TD]

</tbody>

Spreadsheet Formulas
CellFormula
F1=IF(RAND()<0.3,"",RANDBETWEEN(1,63))
G1=IF(F1>=32,64,IF(F1>=16,32,IF(F1>=8,16,IF(F1>=4,8,IF(F1>=2,4,IF(F1>=1,2,0))))))
I1=IF(F1="",0,F1/G1)

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4

Thanks I am going to give this a try also, it definitely looks like it works OK. I didn't realize the impact having a space between the two quotations marks has on a formula.
 
Upvote 0
Here is another set of formulas that you could consider to produce the same results.

BTW, best not to fully quote long posts as it makes the thread harder to read/navigate. If you want to quote, quote small, relevant parts only.

Excel Workbook
FGHI
128320.875
212160.75
322320.6875
4640
529320.90625
6640
745640.703125
831320.96875
959640.921875
10640
1117320.53125
1235640.546875
Sample
 
Upvote 0

Forum statistics

Threads
1,224,816
Messages
6,181,138
Members
453,021
Latest member
Justyna P

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