Check range for Null or 0 value

USAMax

Well-known Member
Joined
May 31, 2006
Messages
846
Office Version
  1. 365
Platform
  1. Windows
Is there a way to check a range for null or zero value.

I need to update large ranges but only if there is no data or if the values are zero. I was thinking of something like:

If IsNull(Range(Cells(1,1), Cells(10,10))

or

If Sum(Range(Cells(1,1), Cells(10,10))) = 0

Any thoughts?
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Hi,

Try,

For Each rcell in rrange
If rcell.value = "" OR rcell.value= 0 Then
"Do this"
Next rcell

Jai
 
Upvote 0
My formula is very simplified but I am looking at thousands of cells that I need to add a formula to if the range is empty.

Range(Cells(1, 1),Cells(100, 239).Formula = "=P5!R[-72]C[39]"

Updating a single cell at a time takes too long so I need to know if the range is empty or zero.
 
Upvote 0
Hi,

I do not think you can check and update the complete range at a time. You have to do it cell by cell.

But I may be wrong.

Maybe someone who knows more about it can help.

Jai
 
Upvote 0
I can update a whole range using the formula I listed above but in this case I only want to update cells that are Zero or Empty.

How do I select or define the rrange for the formula you listed?
 
Upvote 0
Hi,

Dim rrange as Range
Dim rcell as Range

Set rrange = Range("A1:D1000")

Jai
 
Upvote 0

Forum statistics

Threads
1,223,246
Messages
6,170,996
Members
452,373
Latest member
TimReeks

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