Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50301

Name Manager changing my range after I run a macro

$
0
0
Hello all,

Got a weird one here. I have a workbook that has a saved range. I created it with the Name Manager. See below:

Code:

=OFFSET('Corp Paying'!$A$1,0,0,COUNTA('Corp Paying'!$A:$A),COUNTA('Corp Paying'!$1:$1))
When it looks like that the VBA works great and creates my pivots. But after I run my first macro to mess format my source data the range ends up looking like below:

Code:

=OFFSET('Corp Paying'!$Y$1,0,0,COUNTA('Corp Paying'!$Y:$Y),COUNTA('Corp Paying'!$1:$1))
It is for some reason changing the "A" to "Y".

Any thoughts on how I can get it to stay with the original data?

Thanks

Viewing all articles
Browse latest Browse all 50301

Latest Images

Trending Articles



Latest Images