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!
 

Some videos you may like

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

daverunt

Well-known Member
Joined
Jul 9, 2009
Messages
1,887
Office Version
  1. 2013
Platform
  1. Windows
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
 

tomoaca

New Member
Joined
May 18, 2010
Messages
2
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!
 

Watch MrExcel Video

Forum statistics

Threads
1,122,709
Messages
5,597,697
Members
414,164
Latest member
ARTW

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
Top