Okay, I realize no one wants to do someone's work for them. I've puzzled out my numbering issue and a way to include my blank spaces on the Checklog sheet. I've even adapted some code from this forum to make a random selection of my initial data (Thank you MarvinP). I'm still stuck on two things with this piece of my puzzle. Firstly, how do I code in the variable to select 100% of the items that are over one year old or missing an inventory date, or a unique selection equaling 5% of the total inventory? This could mean a combination of both items (i.e. there's one item over 365 days old, but I need to choose 5 items to validate). Secondly, how do I include the variable to randomly select only the items showing "IN USE" on Column D of the Checklog tab?
Here's my code, as it is:
Sub Random()
Dim LastRowSht1 As Double
Dim Ctr As Double
Dim RandRow As Double
Dim x As Range
Worksheets("Sheet1").Cells.ClearContents
Set x = Range("checklog!D3")
For Ctr = 1 To x
RandRow = WorksheetFunction.RandBetween(5, Cells(Rows.Count, "A").End(xlUp).Row)
LastRowSht1 = Worksheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Row + 1
Range("A" & RandRow & ":F" & RandRow).Copy _
Destination:=Worksheets("Sheet1").Range("A" & LastRowSht1 & ":F" & LastRowSht1)
Next Ctr
End Sub
I've attached my updated Macro sheet as well.
Thank you for looking at this.
Bookmarks