Hi Guys,
This my first post. Your urgent help would be appreciated. I've read Mr Excels books and watched dozens of his videos and still can't grasp some of the concepts!! Anyway, I have a spreadsheet and a routine that splits it down by sales rep onto seperate sheets and that works fine. The customer has asked that I conditionally format rows based on a criteria in one column, which I also have the code for and it works fine, but only on the master sheet not those sheets the first part of the VBA creates.
I've tried using....
For Each wsNew In ActiveWorkbook.Worksheets
wsNew.Columns("A:AC").EntireColumn.AutoFit
Next
and this works fine and autofits each column, however the code I recorded for the conditional formatting won't work when using it in between the 'For each wsNew, and Next statements.
There are two conditions if that helps, and it 'appears' that the code is doing the formatting several times on the master sheet, rather than jumping to the next sheet.
Any ideas why please?
This my first post. Your urgent help would be appreciated. I've read Mr Excels books and watched dozens of his videos and still can't grasp some of the concepts!! Anyway, I have a spreadsheet and a routine that splits it down by sales rep onto seperate sheets and that works fine. The customer has asked that I conditionally format rows based on a criteria in one column, which I also have the code for and it works fine, but only on the master sheet not those sheets the first part of the VBA creates.
I've tried using....
For Each wsNew In ActiveWorkbook.Worksheets
wsNew.Columns("A:AC").EntireColumn.AutoFit
Next
and this works fine and autofits each column, however the code I recorded for the conditional formatting won't work when using it in between the 'For each wsNew, and Next statements.
There are two conditions if that helps, and it 'appears' that the code is doing the formatting several times on the master sheet, rather than jumping to the next sheet.
Any ideas why please?
Last edited: