
Originally Posted by
NYGiantsGuy1
Hi Paul,
Im a little confused about what you mean by If ws.Range("A1") = "SOMETHING" Then . So Column A will have employee names that will always be different. Is there something generic I can enter for "something"? Like "IsNotBlank"?
I tried entering a name into this just for testing purposes, If ws.Range("A1") = "Jeff" Then, but when I run the code you posted nothing happens.
Thanks for your help!
-Aidan
Since your original test started in row 3, I was suggesting that if there were some kind of marker or content that could be used as a test
For example, many times a sheet would have something like "Date: 3/1/2016 Report of stuff" in A1
Instead of hard coding sheet names ("SHEET5") which will break the macro when you rename it to "Financial Proof", it's better to make the macro a little smarter
So something like
For Each ws In ActiveWorkbook.Worksheets
If Left(ws.Range("A1").Value,5) = "Title" Then
or
For Each ws In ActiveWorkbook.Worksheets
If Len(ws.Range("A1").Value) > 0 Then
would only process the sheets that pass the text
THAT's the reason I hate to hard code names like that into a macro
The worksheets it needs to run on are"SHEET5", "SHEET6", "SHEET7", "SHEET8", "SHEET9", "SHEET10", "SHEET11", "SHEET12" , and "SHEET13".
Are you saying that the names of the worksheets as shown at the bottom of the window are really not "SHEET5", etc.?