View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ken Wright Ken Wright is offline
external usenet poster
 
Posts: 634
Default macro to create a pivot table

Give us some idea about your data. Are they in consecutive columns? Any
gaps in the headers at all. Does it start from A1 and go across, eg B1, C1
etc. What about number of rows - is it consistent or does it vary. If it
varies, do you have one of those fields that you can rely on to hold data in
every single record, eg if your data was in say A1:K100, could you say
perhaps that every record would have a value in Col C or D etc etc.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------*------------------------------*----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------*------------------------------*----------------


"Catie79" wrote in message
...
I have seen some answers to this question, but my problem is so simple that
I
can't seem to make it work. :-) I have a sheet with about ten columns of
data. I need to create a pivot table with Salesrep as the row field and
Grossamount as the data field. I want to save this pivot table to a sheet
called AcqPivot in the same workbook (AcqReport) and rewrite the old
table.
It's so simple that I wouldn't even bother with a macro if I didn't have
to
do this several times a day. I've tried several approaches, many from
this
site, all with different errors. I believe I am making this too
complicated.
I tried recording, no dice, I tried some code samples, but I can't seem to
make it simple enough without breaking something. I'm on Excel 2003. Any
suggestions for sites with reliable code suggestions, examples, or tips
would
be very much appreciated.