Lazerus3511
New Member
- Joined
- Apr 5, 2015
- Messages
- 15
Greetings all,
I have been using this site for my VBA needs for a couple months now, but this is the first time I've needed to post! I am having trouble with something that I think would be pretty easy and my Record Macro button isn't catching it for some reason. I appreciate in advance you taking the time to review this and your guidance.
I would like to start off by saying that I am just starting out with VBA!
So here is what I got going on so far:
This finds blank cells in the active worksheet in C and deletes the row. I would like to add a second part to it that which looks in A and B to find cells that say "no work" or "none" (not case sensitive) and clears the contents of that cell.
It would also be pretty cool to have this Macro check just a range of Row 4:1000, but that is not a necessity.
Thanks again all!
I have been using this site for my VBA needs for a couple months now, but this is the first time I've needed to post! I am having trouble with something that I think would be pretty easy and my Record Macro button isn't catching it for some reason. I appreciate in advance you taking the time to review this and your guidance.
I would like to start off by saying that I am just starting out with VBA!
So here is what I got going on so far:
This finds blank cells in the active worksheet in C and deletes the row. I would like to add a second part to it that which looks in A and B to find cells that say "no work" or "none" (not case sensitive) and clears the contents of that cell.
It would also be pretty cool to have this Macro check just a range of Row 4:1000, but that is not a necessity.
Code:
Sub BuildInventory()
Dim iRow As Long
Dim LastRow As Long
' This macro deletes all Blank rows on the active worksheet
' that have no value in column A.
LastRow = ActiveSheet.UsedRange.Rows.Count + ActiveSheet.UsedRange.Row - 1
For iRow = LastRow To 1 Step -1
If Cells(iRow, 3) = "" Then Rows(iRow).Delete
Next iRow
' Finished Deleting blanks.
' Now I would like to add something that finds "no work" or "none" in Column A and B and clearcontents here'
' Finished clearing No Work and none
End Sub
Thanks again all!