Autofill down Vlookup formula between sum?

J

Juan

Hi,
I have a vlookup formula let's say in K2, is there a way to autofill down
but exclude sum totals?
Example
Vlookup formula
data
total sum Group1
data
total sum group2
grand total sum of group1 & 2
So I need to copy the vlookup between the sum totals. Is there a way?
any help would really appreciate.
thanks
Juan
 
M

Mike

Assuming your sums are formulas, not entered values, then (and for this
example, I'm assuming everycell between and including your vlookup to the
grandsum has something in it) something like:

with activesheet
.range("k2").copy
.range(.range("k2"),
..range("k2").end(xldown)).specialcells(constants_only).pastespecial
formulas_only
end with

sorry, I'm not sitting in front of my excel so I don't remember what the
constants for constants_only and formulas_only really are but if you're in
the vba editor they'll pop up.
 

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