Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel Query Help

Status
Not open for further replies.

krappleby025

Programmer
Sep 6, 2001
347
NL
Hi all,

Im trying to run what i believe to be a simple query over two excel spread sheets in the same workbook, but i cannot get it to work.

I have an excel spreadsheet with 5-6000 records, each record has 7-9 columns of data.

In the second sheet im trying to generate a report based on the data, and the query im trying to set up is something like this

Count the number of rows, where (row)column A contains 345 AND (ROW) column D contains "refered".

Now i have tried several different statements to do this, Including IF, and COUNTIF, but i just cannot seem to get it to work for more than one variable.

I have been on at this for a week looking up data and infomration but to no luck

Can someone help

Cheers
Keith
 
using your spelling of refered

=SUMPRODUCT((Sheet1!A1:A6000=345)*(Sheet1!D1:D6000="refered"))

Assumes nothing else in those cells but the values of 345 and refered and that your data is on Sheet1

Regards
Ken.................

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
PS, A pivot table would this for you in a heartbeat.


Regards
Ken...................

----------------------------------------------------------------------------
[peace]It's easier to beg forgiveness than ask permission[2thumbsup]

----------------------------------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top