Data Form, Countif and Macro

H

helen wheels

I have a spreadsheet where I've used a form to enter a customer's
detail and the price of the ticket. I've got a macro that adds that
information to a worksheet.

I've then got a countif formula with absolute cell references to count
the number of people wanting which starter, starter 1, starter 2 or
starter 3.

The problem I have is that the macros is adding the data to the top of
the data in the worksheet by inserting a new row between the existing
data and below the heading, which means the countif isn't seeing the
newest data added to the sheet.

Any help would be greatly received.

Many thanks.
 
P

Pete_UK

Maybe you should change your COUNTIF formula so that it uses the full
column - instead of:

=COUNTIF(A$2:A$50,2)

change it to:

=COUNTIF($A:$A,2)

Hope this helps.

Pete
 
H

helen wheels

Pete

Thank you so much for your help - it seems blindlingly obvious now!

Much appreciated - have a good weekend.


Helen
 

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