Lookup Column Headings and Sum the Rows

R

Reha

Hi,
I am having Data in a Excel 2003 worksheet as follows:
Row 4 = Headings
Row 5 downwards is my data

I wish a macro to lookup for Headings viz “abc def” and “uvw xyz” in
Row 4 and insert a sum function below the last cell in respective
columns.

Please note that there may be blanks cells in the columns. The macro
should see for the last row used and then insert the Sum Function
under respective columns.

Any help would be greatly appreciated.

Reha
 
P

Pete_UK

Why not have the SUM function above your headers, and then you don't
need to scroll down to see it. The function could then have a range
which is much bigger than expected, so you don't need to worry about
adding extra values to those columns. For example, insert a new row 4
if necessary, and use this formula in D4:

=SUM(D5:D10000)

Copy it to other cells on that row.

Hope this helps.

Pete
 
R

Reha

Why not have the SUM function above your headers, and then you don't
need to scroll down to see it. The function could then have a range
which is much bigger than expected, so you don't need to worry about
adding extra values to those columns. For example, insert a new row 4
if necessary, and use this formula in D4:

=SUM(D5:D10000)

Copy it to other cells on that row.

Hope this helps.

Pete







- Show quoted text -

Thanks for your response... But I am looking for a macro
 
D

Don Guillett Excel MVP

Thanks for your response... But I am looking for a macro- Hide quoted text -

- Show quoted text -

See my response in your ORIGINAL post. Bad netiquette.
 

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