kelly mort
Well-known Member
- Joined
- Apr 10, 2017
- Messages
- 2,169
- Office Version
- 2016
- Platform
- Windows
This is what I am having currently and it's working very fine - with a single sheet.
Now what I want to achieve is to be able to get the missing numbers from multiple sheets.
For now I have 6 sheets that I want to check for the missing number(s).
My sheets have the naming structure as below:
I am showing this structure so that those willing to assist me with the code will have a clear view of what to expect so that they don't assume my sheets are continuous, like Sheet1, ....., sheet6.
I know the above sheet names don't actually sound cool enough but for now, let us forget about how cool those names are (they are just samples).
Some of the sheets might be blank. Which means they might not have data from row 4 downloads (as defined in my code below).
Which means that we have to skip all those blank sheets and only check for the non-blank sheets.
Thanks in advance.
Now what I want to achieve is to be able to get the missing numbers from multiple sheets.
For now I have 6 sheets that I want to check for the missing number(s).
My sheets have the naming structure as below:
Code:
Data 1, Data 2, Data 3, 1st Report, 2nd Report, Products
I know the above sheet names don't actually sound cool enough but for now, let us forget about how cool those names are (they are just samples).
Some of the sheets might be blank. Which means they might not have data from row 4 downloads (as defined in my code below).
Which means that we have to skip all those blank sheets and only check for the non-blank sheets.
Thanks in advance.
Code:
Sub GetMissingNum ()
Dim e&, i&, lr&, sh As Worksheet
e = 0
Set sh = Sheet1.Cells (Rows.Count, "A").End (xlUp).Row
If lr < 4 Then lr = 4
With sh.Range("A4:A" & lr)
Do
e = e + 1
Loop Until IsError(Application.Match(e, .Cells, 0))
MsgBox e
End With
End Sub