divide by 2 returning #VALUE! if blank cell

MuddyStone

New Member
Joined
Aug 14, 2021
Messages
3
Office Version
  1. 365
Hi,

I'm trying to write a formula in cell V33 of my spreadsheet that looks at two other cells...

Cell R33 = profit made on a commodity
Cell U33 = number of days the commodity was owned

First of all, if R33 is blank, then I want V33 to be blank as well

If the commodity was owned for less than 365 days (U33), then I want to return the same profit value from R33 in V33
However, if the commodity was owned for more than 365 days (U33), then I want to divide the profit value in R33, by 2

This is the formula I'm using...

=IF(ISBLANK(R33),"",IF(U33>365,R33/2,R33))
It works perfectly unless R33 is blank, i.e. = 0 and the commodity is owned for more than 365 days, in which case the cell returns #VALUE!

I've tried IFERROR but can't seem to get my syntax right? Any help appreciated.

Thanks
Muddy
 

Attachments

  • Value error.PNG
    Value error.PNG
    8.9 KB · Views: 13

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Make sure R33 is a Number and NOT a text version of that number
Otherwise works fine for me
 
Upvote 0
Make sure R33 is a Number and NOT a text version of that number
Otherwise works fine for me
Ahh... thank you Michael, R33 is actually a blank cell because it has it's own ISBLANK statement. I changed its isblank formula to return a zero instead of a blank and suddenly, my V33 formula worked.

Would prefer to have been able to keep R33 blank instead of returning a zero but I can with it.

Thanks again :)
 
Upvote 0
Try using
Excel Formula:
=IF(IR33="","",IF(U33>365,R33/2,R33))
 
Upvote 0
Solution
glad to help...(y):cool:
and shoulda been,without the "I"
Excel Formula:
=IF(R33="","",IF(U33>365,R33/2,R33))
 
Upvote 0

Forum statistics

Threads
1,214,520
Messages
6,120,016
Members
448,936
Latest member
almerpogi

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