View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
James James is offline
external usenet poster
 
Posts: 542
Default VBA to SUM only certain cells

I have no clue on this one or how to even start it. I have a spreadsheet
with data in a row, the data starts at G2 and goes until AS2. I want to
"SUM" this data but the complicated part comes now.... In some cases I want
to to SUM G2 thru S2, or AA2 thru AN2, or even G2 thru AS2. The results
would need to be placed in AU2.

I really dont have a set of standards that I SUM, it is all dependent on
what values I have in these cells and what I plan on doing with them that
day. Is it possible to write a code that allows the user to pick the cells
they want to sum, such as dragging over the cells needed?

Thanks again for the help.