Search for blank cells between two filled

tomoaca

New Member
Joined
May 18, 2010
Messages
2
Hi there!

I need to know how to elaborate a function that searchs for empty cells between two filled others. For example: in a row, with an interval of 10 columns (A1:J1), between two cells filled with "1" at the B1 and F1 positions, if there is any blank cells between them.


ABCDEFGHIJ
1 1 1
24579313892


How to do that?


Thanks!
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Not quite sure what you are after: This will tell you where there are empty cells in a row.

Code:
Sub Spaces_find()
 
For Each Dn In Range("A1:I1")
If Not Dn.Value > 0 Then
 
    MsgBox (Dn.Address(0, 0))
End If
 
Next Dn
End Sub
 
Upvote 0
I'm new in here, so I don't know how to put this code to work... I believe it is a VBA code, isn't it? Well... I've never tried it before.... But, even so, I need to search blank cells between two neighbors containing the number one "1". Imagine that there's a row with 10 columns, and that the 1 could appear in any of the columns more than one time. If the number 1 appears two times, I need to run an analysis where excel searches for blank cells between those "1". I don't need it to count how many cells there are in between; only know if there are. Also there's any possibility that it could be done combining functions, or it only could be done under VBA codes? If so, where can I get some help on doing that in excel? Did I make myself clear?... Thanks a lot!
 
Upvote 0

Forum statistics

Threads
1,213,550
Messages
6,114,265
Members
448,558
Latest member
aivin

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