hjgoldstein
Programmer
Hi all.
I have generated a macro which performs a couple of functions in my data and then inserts a Pivot Table into the current worksheet.
The data I am using are generated from an external system on a daily basis and the number of records varies.
Here is my question - I know there is an answer and you are probably way ahead of me.
The macro has an absolute row reference for both the copying of functions from (say) B2 to Range B3:B378 and also for the generation of the Pivot Table using A1378.
The data today has only 342 records so there are 36 blank records in the Pivot. that's bad enough, but when there are, say, 489 records, there will be 147 records missing from the data in the Pivot.
Can you advise me how to change
and
so that the macro looks for the last populated cell in column B?
Any help would be appreciated.
Aspiring to mediocrity since 1957
I have generated a macro which performs a couple of functions in my data and then inserts a Pivot Table into the current worksheet.
The data I am using are generated from an external system on a daily basis and the number of records varies.
Here is my question - I know there is an answer and you are probably way ahead of me.
The macro has an absolute row reference for both the copying of functions from (say) B2 to Range B3:B378 and also for the generation of the Pivot Table using A1378.
The data today has only 342 records so there are 36 blank records in the Pivot. that's bad enough, but when there are, say, 489 records, there will be 147 records missing from the data in the Pivot.
Can you advise me how to change
Code:
Range("B378").Select
Code:
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
"Sheet1!R1C1:R378C127"
Any help would be appreciated.
Aspiring to mediocrity since 1957