Hi All, <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com
ffice
ffice" /><o
></o
>
<o
></o
>
I wanted to know if it is possible to run a VBA simultaneously on two worksheets (in order to increase speed and reduce coding) <o
></o
>
<o
></o
>
For example, I want the following code to run on worksheet A & B<o
></o
>
<o
></o
>
Sheets("A").Select<o
></o
>
'Weeknum
Range("AE2").Formula = "=Int(Day(AD2) / 7 + 0.99)"
Range("AE2").AutoFill Range("AE2").Resize(Lastline - 1)
Range("AE1") = "WeekNum"
Range("AE:AE").Value = Range("AE:AE").Value<o
></o
>
<o
></o
>
Sheets("B").Select<o
></o
>
'Weeknum
Range("AE2").Formula = "=Int(Day(AD2) / 7 + 0.99)"
Range("AE2").AutoFill Range("AE2").Resize(Lastline - 1)
Range("AE1") = "WeekNum"
Range("AE:AE").Value = Range("AE:AE").Value<o
></o
>
<o
></o
>
Can I combine these codes so it runs without jumping from one sheet to the next? <o
></o
>




<o


I wanted to know if it is possible to run a VBA simultaneously on two worksheets (in order to increase speed and reduce coding) <o


<o


For example, I want the following code to run on worksheet A & B<o


<o


Sheets("A").Select<o


'Weeknum
Range("AE2").Formula = "=Int(Day(AD2) / 7 + 0.99)"
Range("AE2").AutoFill Range("AE2").Resize(Lastline - 1)
Range("AE1") = "WeekNum"
Range("AE:AE").Value = Range("AE:AE").Value<o


<o


Sheets("B").Select<o


'Weeknum
Range("AE2").Formula = "=Int(Day(AD2) / 7 + 0.99)"
Range("AE2").AutoFill Range("AE2").Resize(Lastline - 1)
Range("AE1") = "WeekNum"
Range("AE:AE").Value = Range("AE:AE").Value<o


<o


Can I combine these codes so it runs without jumping from one sheet to the next? <o

