VBA Help Please

  • Thread starter Thread starter steveski
  • Start date Start date
S

steveski

I have a data entry sheet with a column called “Priority” and a colum
called “Start Flag”.
I have a chart (not a PivotChart) which is located as an object in
spreadsheet.
I am trying to develop VBA code which will do the following:

Upon activation of the spreadsheet containing the chart:
Check each row (record) of the data entry sheet and count the record
where Priority = “E” and Start Flag = “TRUE”
Enter the result in a certain cell of the spreadsheet
Check each row (record) of the data entry sheet and count the record
where Priority = “O” and Start Flag = “TRUE”
Enter the result in a certain other cell of the spreadsheet
Etc.

Can you help please
 
Apologies if a silly question, but why would you use VBA for this. Excel has
perfectly good built in functionality that will achieve this in a heartbeat, and
will probably be much more efficient than using VBA, eg:-

=SUMPRODUCT((RngA="E")*(RngB="TRUE")) will count all records where the values in
( RngA = E AND RngB = "TRUE" )

and so on (Ranges must be the same size)...

If I misread this then my apologies.
 
Thanks for your feedback, I did not know about the SUMPRODUCT functio
before today.

However, I only posted a simplified version of the problem I am tryin
to solve, I actually need to do quite a bit of polling from the "Dat
Entry" sheet, performing some tests, and posting the results of th
tests to a different sheet.

If you get a chance please see my other topic thread at:

http://www.excelforum.com/showthread.php?s=&threadid=196007

Thanks
 
Back
Top