Subtotals

P

praveen_khm

Hey all,

I need your help to complete a project of mine. I am making project
using Macros. I have least knowledge of VB Script. I am creating macros
by recording it. I have created subtotals for a worksheet. Now, I need
to copy only the titles and the numbers assigned to it. But when I copy
it and paste it, or even using paste special, Values, I get the complete
content but not the only required data. Ex. I select option 2 when
created subtotals. There, I get a list of all the variables with a +
mark next to it. If I copy the content and paste it else where, I get
all the details which appear when + is clicked. I need only the data in
there, i.e, only + contents to be copied and pasted. Please help. Quick
response is appreciated.
Thanks,
Pravi:)
 
D

Dave Peterson

Record a macro when you hide the details.
Select the range to copy
edit|goto|special|check visible cells
edit|copy

And edit|Paste
stop the macro recorder.

==
You may want to look at Data|pivottables to get subtotals, too.
 
P

praveen_khm

Thanks Dave,

This had really made a mess out of my project. Thanks a lot for you
quick response.

:) Pravee
 
B

Bob Phillips

Set a range object to the whole data

Set rng = Activesheet.UsedRange

then pick out the visible data

Set rng = rng.SpeciallCells(xlCellTypeVisible)

and copy that to wherever you need.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"praveen_khm" <[email protected]>
wrote in message
news:p[email protected]...
 
Top