Need macro to automatically update Excel Pivot Table

S

Sara

Hi!

I'm looking for a macro that would automatically update a
pivot table after any data entry in an Excel worksheet.
I'm not looking for a button that would do this. But
reaaly have the pivot table updated after any entries made.

Need big time on this!

Thanks in advance!

Sara
 
M

Myrna Larson

You could use a Worksheet_Change event macro for this. To get the code to update the pivot
table, turn on the macro recorder and do it manually. Then use this code as the basis for your
event macro.
 
S

Sara

Thanks 1000 times, I've looked at this event macro and was
able to make it work. Just save me bunch of hours.
Thanks for the quick reply.
Sara

-----Original Message-----
You could use a Worksheet_Change event macro for this. To
get the code to update the pivot
table, turn on the macro recorder and do it manually.
Then use this code as the basis for your
event macro.
 
R

Richard Choate

keep in mind that if you do this, Excel may jump and jitter after anything
is typed, as it is recalculating, and it can get to be an annoyance for it
to always be calculating. You may want to test it before you send it out and
see if that is really what you want.
Richard Choate


You could use a Worksheet_Change event macro for this. To get the code to
update the pivot
table, turn on the macro recorder and do it manually. Then use this code as
the basis for your
event macro.
 
O

Orlando Magalhães Filho

If Pivot Table stay on separate sheet, maybe Sheet Activate event is more
suitable.

Regards,

Orlando


Richard Choate said:
No, your way is really the only way to do that. I'm just suggesting the OP
might want to consider what the cost of her option is.
Richard Choate

I don't recommend it, either, but if that's what the OP wants, I don't know
of any other way to
accomplish it, do you?


keep in mind that if you do this, Excel may jump and jitter after anything
is typed, as it is recalculating, and it can get to be an annoyance for it
to always be calculating. You may want to test it before you send it out and
see if that is really what you want.
Richard Choate


You could use a Worksheet_Change event macro for this. To get the code to
update the pivot
table, turn on the macro recorder and do it manually. Then use this code as
the basis for your
event macro.
 
S

Sara

Thanks All!
I've no problem with the refresh after something is type,
my problem now is to make the macro work while protecting
cells. Tried a few things, but I always seems to get it
blocked somewhere!
Thanks again!
Sara

-----Original Message-----
If Pivot Table stay on separate sheet, maybe Sheet Activate event is more
suitable.

Regards,

Orlando


"Richard Choate" <[email protected]> escreveu na mensagem
No, your way is really the only way to do that. I'm just suggesting the OP
might want to consider what the cost of her option is.
Richard Choate

I don't recommend it, either, but if that's what the OP
wants, I don't
know
of any other way to
accomplish it, do you?
jitter after
anything an annoyance for
it
before you send it out
and
Then use this code
as
 
M

Myrna Larson

I know what you mean!

No, your way is really the only way to do that. I'm just suggesting the OP
might want to consider what the cost of her option is.
Richard Choate

I don't recommend it, either, but if that's what the OP wants, I don't know
of any other way to
accomplish it, do you?
 
M

Myrna Larson

Good suggestion, Orlando.

If Pivot Table stay on separate sheet, maybe Sheet Activate event is more
suitable.

Regards,

Orlando


Richard Choate said:
No, your way is really the only way to do that. I'm just suggesting the OP
might want to consider what the cost of her option is.
Richard Choate

I don't recommend it, either, but if that's what the OP wants, I don't know
of any other way to
accomplish it, do you?
 
M

Myrna Larson

If you mean that it crashes because the sheet is protected, you have to surround your existing
code by an Unprotect at the top and a Protect at the bottom.

Thanks All!
I've no problem with the refresh after something is type,
my problem now is to make the macro work while protecting
cells. Tried a few things, but I always seems to get it
blocked somewhere!
Thanks again!
Sara
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top