how to count total record and amount

M

mango

dear all, hope can help.
1)how to do counting and sum(number of records input) using macro. i want to
automate. in actual case i do not know how many records user input. so i want
it to count/sum automatically.

customer amount
abc 20
xyz 45
utf 22 the total record is 3 and amount is
87. how to
automate in macro to count and sum
automatically
in macro?

2) how to put the statement in macro to do save? i want to save the file in
this format where company i get from button caption.
{company}{date}.txt
thebest23092004.txt
 
M

mango

dear frank,
i want to automate it as i dun know how many record user will put in
currently i put this function(count and sum) at row 200 as user told me
normally they only process about 100 records.
 
F

Frank Kabel

Hi
easy workaround:
Put this formula in the first row of your data and suse
=SUM(A2:A1000)
and
=COUNTA(A2:A1000)

This should deal with variable record numbers. No need for vBA here (as the
user has to run a macro anyway manually)
 

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