Code Modification

  • Thread starter Thread starter Mas
  • Start date Start date
M

Mas

Hi All,

I have the following code to display missing items from a
serial:

like i f i have 1,2,5,7,10,11,12 etc in my column C to
find what is missing in between 1 and 12 (3,4,6,8,9,) ..


For Each c In Range([C1], [C65536].End(xlUp))
If c.Offset(1).Value = "" Then Exit For
j = c.Value
Do Until j = c.Offset(1).Value - 1
j = j + 1: i = i + 1
k = ListBox1.ListCount
ListBox1.AddItem j

Loop

Next

If k = 0 Then ListBox1.AddItem "Not Found"


How I can modi fy the code so that i can use the same in
a filtered range

like if have filtered the range based on a criteria in
field 7? so that the code will look only visible cells
and list all missing between first no and last no or
within a given from and to serial?

Thanks In Advance

Mas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top