VBA Help Please

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

--
Message posted from http://www.ExcelForum.com

0
2/28/2004 5:51:45 PM
excel 39879 articles. 2 followers. Follow

2 Replies
684 Views

Similar Articles

[PageSpeed] 34

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.

-- 
Regards
           Ken.......................    Microsoft MVP - Excel
                  Sys Spec - Win XP Pro /  XL 00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------



"steveski >" <<steveski.12clc7@excelforum-nospam.com> wrote in message
news:steveski.12clc7@excelforum-nospam.com...
> I have a data entry sheet with a column called �Priority� and a column
> called �Start Flag�.
> I have a chart (not a PivotChart) which is located as an object in a
> 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 records
> 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 records
> where Priority = �O� and Start Flag = �TRUE�
> Enter the result in a certain other cell of the spreadsheet
> Etc.
>
> Can you help please?
>
>
> ---
> Message posted from http://www.ExcelForum.com/
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.598 / Virus Database: 380 - Release Date: 28/02/2004


0
ken.wright (2489)
2/28/2004 6:02:41 PM
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

--
Message posted from http://www.ExcelForum.com

0
2/29/2004 12:46:06 AM
Reply:

Similar Artilces:

VBA code to say Yes or No if any VBA code is present in ActiveWork
Using XL 2003 & 97 Would like hit Ctrl+Shift+V and have an answer either yes or no as to the presence of Any VBA code in the Active Workbook. I do know that about the VBA editor/Explorer or to press the Run Macro button and get a list from various sources . I would like to stay at the keyboard and process a series of macros including one to let me know if I even need to evoke the VBA explorer. TIA Dennis There is no bootstrap macro to tell you whether you have macros or not. If there were there would be no limit to virus writers. --- HTH, David McRitchie, Microsoft MVP - Excel ...

Help with macro/and or formula?
Perhaps this is a silly question, but i just can't figure out how t format this worksheet. The problem is that a lot of the cells hav numbers in them with negative signs in the back instead of in the fron (ie. 23-) and i was wondering if anyone knew of a macro/formula i coul use to quickly fix this problem for all the cells. I would b extremely grateful. Thanks -- brefed1 ----------------------------------------------------------------------- brefed15's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=3557 View this thread: http://www.excelforum.com/showthre...

HELP !!
I have a long long column of company names ie Company a Company b Company c But some of them are duplicated ie Company a Company b Company b Company b Company c Company c Company c How can I do a count on these companies so that I'm only provided with a count of each individual company name. (rather than the duplicates as well). So the count for the list of duplicates above would be '3'. Any one help???? Regards Dave =SUM(1/COUNTIF(A1:A7,A1:A7)) This formula must be array entered - You must press ctrl+shift+enter (as opposed to just hitting enter) after inserting the...

Print, Merged Cells, and VBA
Hello I'm looking for a code that will help me with a print job for a worksheet. There are a lot of merged cells and a lot of "IF"s to be used in the VBA for range selection. Thanks in advance, Sarr ...

help
hello, i am modifying the diskperf sample in the wdk so that i can communicate with it from user land. the diskperf sample is WDM. at the end of DriverEntry, i do: RtlInitUnicodeString( &ntUnicodeString, NT_DEVICE_NAME ); status = IoCreateDevice(DriverObject, 0, &ntUnicodeString, FILE_DEVICE_UNKNOWN, FILE_DEVICE_SECURE_OPEN, FALSE, &deviceObject ); where NT_DEVICE_NAME is defined as : #define NT_DEVICE_NAME L"\\Device\\DiskPerfTest" then i set up the symbolic link. then, in the IRP_MJ_DEVICE_CONTROL handler, i do a check for some IOCTRL code...

Use VBA to update Access table or Query from Excel
Can I use VBA to update Access table or Query from Excel? Thanks in advance Hi Leungkong, > Can I use VBA to update Access table or Query from Excel? Of course, using ADO or DAO. See: http://www.erlandsendata.no/english/index.php?d=envbadacexportado Regards, Jan Karel Pieterse Excel MVP http://www.jkp-ads.com Hi Jan, Thanks. I think ADO is what I want. But I am not only want to export from excel to access. I want to edit some data in access table. For example, Access has a table "ProductList" I want to use Excel to call the product by "Pro...

Some macro help with shelling out to other program
We are using VNC in house to do remote control between workstations. As there are over 25 of them, I would like to set up a little macro in Excel (2003) that when run, displays a list of user names along with a box prompting for which # on the list you want to connect to. Here's what I have so far: ---- Sub RunVNC() Shell ("c:\program files\hyena\vncviewer.exe sv-ws6") End Sub ---- I would like to see something like: 1. Payroll 2. Receivables 3. Accountant 4. Reception Please enter the number to connect to: Typing 1 and pressing ENTER would run the Shell command abov...

Help! Lost secure channel
Hi, Yesterday after a routine reboot, the first Exchange server (there are two) lost it's secure channel with the domain. I can no longer logon with domain credentials, but still can logon locally. There are a couple of fatal schannel errors in the log and users cannot login to their accounts. I've tried using netdom to re-establish the secure channel and although it reports success, I still cannot logon and no mail flows. Does anybody have any ideas to resolve this? What would the implications be of rejoining this server to the domain? It will recreate it's SID, right? Will thi...

Help with SQL log!!!
I run SQL 2000 as my backend for RMS. My database is only 65 megs, but the log file has grown to 67 gigs! I only have 75 available total and am about to run out. How do I shrink the logfile, or what can I do before I get stuck in a jam. Thanks, Nick Run from query analyzer BACKUP LOG { database_name | @database_name_var } { [ WITH { NO_LOG | TRUNCATE_ONLY } ] } backup log mydatabase with truncate_only Your database is corrupted. http://www.simonajewelry.com/tbs/rms.aspx There is a link on that page on the bottom to a KB on how to fix log file size issue. Also, do you ...

VBA and Scheduled task in Outlook
Hi, how can I: a) pull the query from somewhere and send it by e-mail automatically. E.g. I want to take a temperature table from http://www.wunderground.com/history/airport/EHAM/2009/7/10/DailyHistory.html?req_city=NA&req_state=NA&req_statename=NA where 2009/7/10 is the date of yesterday put it into an e-mail and send it automatically each day at 8 o'clock? b) if this is not possible, how can I send an e-mail with the attachment c:\Documents\query20090710.xls each day at 8 o'clock? my boss wants this automatized, I know how to write the VBA code for Excel, but don'...

Help with custom entity scenario
We've come across a bit of CRM customisation which I would appreciate any advice you can give. Basically what we are trying to achieve is to be able to log the interest in applications our products could be used in against lead, opportunity and account. The application interest doesn't need to be directly tied to products but we do need the ability to record multiple applications against each. An example of some of the applications is as follows: Anatomy Bacteriology Biochemistry Biological Vaccines Biophysics Blood bank Botany ...

Invisible Pictures
Never had a prob before, but since yesterday, when I try to put a picture into MS Publisher (2003) it's invisible. It's there, because the placeholders adapt to the new shape and size - but no picture is actually visible. I've tried it with images I've used previously just to make sure it wasn't anything to do with the actual image I was trying to put in, but no joy. Can't find anything in Help or Troubleshooting to address this problem. Much appreciate any ideas as I need to do this for our shop publicity. The third FAQ here Q: Why can I not see images/shapes...

Is it possible to pass Certification Exams without proper training? Yes now its possible, this site will help you to download all guides and latest exam material for CISCO, MICROSOFT, ORACLE, COMPTIA,
Is it possible to pass Certification Exams without proper training? Yes now its possible, this site will help you to download all guides and latest exam material for CISCO, MICROSOFT, ORACLE, COMPTIA, LINUX. I received many e-mail from visitor about this site and to feel happy because this one can help you pass your certification exams very easily. Visit http://www.FreeExamKing.com ...

vba select field
Hi, having a button on a form, is it possible to select only some fields (all from the same table) of the current record instead of all fields? I've tried this code: RunCommand acCmdSelectRecord RunCommand acCmdCopy Forse dipende dei dati nel record. but it selects ALL fields in the form. Thank you. Remigio hi, On 10.04.2010 18:01, remigio wrote: > having a button on a form, is it possible to select only some fields > (all from the same table) of the current record instead of all fields? > I've tried this code: > > RunCommand acCmdSelectRecord &...

Location of Right Click Start Logo Items
Hi, I have changed the openning location for Windows Explorer at the default location under accessaries and is all good load to new location, however when I use the right click start logo shortcuts "Explore, Open all users, and Explore all users" its not starting at he new location. I want to change the right click start logo shortcuts starting locations but when I right click the shortcuts instead of getting a list so I can go to properties it actually runs the shortcut. I would like to know where to find the actual shortcuts so I can change the starting locatio...

VLOOKUP in VBA
On the worksheet I can insert in a cell =VLOOKUP(C5, Hobokee.xls!AcsLow, 2) and it works perfectly, looks up the value in column 2 of the range named AcsLow in the same workbook. But elswhere I want in a macro to lookup the same table and assign the result to a variable BalAmt. BalAmt = VLOOKUP(AccNum, Hobokee.xls!AcsLow, 2) does not work. It gives a function not defined error on Hobokee. If instead of Hobokee I put Workbooks("Hobokee"), it gives function not defined error for VLOOKUP which it changes to VLookup. I have been overVLOOKUP in the Help file and see nothing wrong. W...

Excel VBA/Macro programming for beginners
Hi all, I know a bit VB 6.0 programming. Will it help me to write exce vba/macro(same thing?).can anybody help me by providing some fre websites where i can have informations/codes for VBA/macro. Please tell me how could i make a *command Button * in a cell in th excel sheet -- sdebu_200 ----------------------------------------------------------------------- sdebu_2000's Profile: http://www.officehelp.in/member.php?userid=430 View this thread: http://www.officehelp.in/showthread.php?t=118812 Posted from - http://www.officehelp.i Try David McRitchie's "getting started with mac...

Turn pc speaker on/off with vba code
Is this possible? Thanks I found something here on how to do it withVBScript. You can probably modify it to work in VBA http://www.pcreview.co.uk/forums/thread-1468591.php -- HTH, Barb Reinhardt "David" wrote: > Is this possible? > Thanks Thanks Barb I'll have a go (I need to improve my web searching skills) "Barb Reinhardt" wrote: > I found something here on how to do it withVBScript. You can probably modify > it to work in VBA > > http://www.pcreview.co.uk/forums/thread-1468591.php > -- > HTH, > ...

Help configuring email delivery
how do I configure my email server to deliver email destined for a specific domain to a specific IP address in Microsoft Exchange server 2003? For example if i wanted all outbound messages for xyz.com to be directly delivered to IP address 64.15.2.25, ho wwould I configure that? Thanks. configure an additional smtp connector...you will have the option to do just that... -- Susan Conkey [MVP] "TD" <TD@discussions.microsoft.com> wrote in message news:925866B8-C382-4BC9-A4FA-4736CEC6D953@microsoft.com... > how do I configure my email server to deliver email destined f...

I need help with a table formula/mass editting
I have a spreadsheet (.csv) with 1600 products/rows and several columns. One of the columns that has the product descriptions also contains 1600 rows. In each row under that 'description' column is a formula/code to input a chart/table with product details to our web site in a chart form. I have many new products that I need to place on the web site with this layout. I need to know how to optimize that particular column to add specific details to the chart formula for the 1600 products. For instance, I need the chart to be the same on each product but with different ...

Loading a Form from VBA
Hi all, I'd like a module to open and load a form in my Access 2003 database... How can I do this? Use the OpenForm method. Look in the Help file for details. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Mike" <michael.leon.schwartz@gmail.com> wrote in message news:1184770076.109526.207900@o11g2000prd.googlegroups.com... > Hi all, I'd like a module to open and load a form in my Access 2003 > database... How can I do this? > On Jul 18, 10:58 am, "Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com&g...

Excel and VBA
I am very interested in learning more about using VBA in office, especially Excel. Can you post some resources (online, books, etc) that can be used to help learn about using Visual Basic in office. Thanks! Here's a good place to start: http://www.contextures.com/xlbooks.html Does that help? *********** Regards, Ron XL2002, WinXP "Bob Sinclair" wrote: > I am very interested in learning more about using VBA in office, especially > Excel. Can you post some resources (online, books, etc) that can be used to > help learn about using Visual Basic in office. >...

dual Y axis help
I've read over some of these threads. However, I cannot seem to find something that can help me out. Here's what I'm looking to do: I need a 2 Y-Axis bar chart. The left Y-Axis=revenue, the right Y-axis=% of revenue. The X-axis is the country im referring to. What I need to see visually is Revenue being shown, and within the Revenue bar 3 smaller bars representing 3 different Operating expenses(% of revenue format). Is this possible? Am I clear? I just need a bar chart within a bar chart with 2 y-axis. Thanks. Hi, See Jon Peltier's page for links to cluster/stacked ...

Seeking Help
We're a startup and looking to develop our services utilizing Microsoft CRM and we're looking for people who can help us get up and running. Our instance is already installed and functional on SBS 2003 (Small Business Edition of CRM 3) with SP1 applied and using Outlook 2003 and 2007 clients so we don't need help on the install. What we are looking for are people who can help with. * Email to Case * Service Scheduling - Look up a client with a contract that matches a trigger/event and scheduling a service based upon a rule. For example if we have a managed Windows 2003 client a...

VBA Customization
Is there a way to get the name of the current company through VBA in Great Plains 8.0? Thanks for all your help. open GreatPlains. Add the current window, it will add the Toolbar then add fields choose the company name on the top left after the user id. >-----Original Message----- >Is there a way to get the name of the current company through VBA in Great >Plains 8.0? > >Thanks for all your help. > > > >. > Thanks. I tried, but I couldn't add company name to the field list. It opens up the login screen instead. Any thoughts? Thanks again. "ger...