Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Chick N Egg
 
Posts: n/a
Default How do I use DCount to exclude data?

I am trying to exclude price ranges from <100,000 to 150,000 from my
database, my criteria range is B9:C10.
Price <100000
Price 150000
These are on 2 separate lines.

I have my database entered and "price" as my field range, but my criteria
range is wrong. I am using Office XP. How do I set this up?

T Lodge
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Clivey_UK
 
Posts: n/a
Default How do I use DCount to exclude data?


Looking at Excel's Help File on Dcount (specifically the Criteria
Examples section), it may be that you need to have the two prices on
the same row; see the part of the Help file's example that says:
=DCOUNT(A4:E10,"Age",A1:F2) This function looks at the records of apple
trees between a height of 10 and 16 and counts how many of the Age
fields in those records contain numbers.

Chick N Egg Wrote:
I am trying to exclude price ranges from <100,000 to 150,000 from my
database, my criteria range is B9:C10.
Price <100000
Price 150000
These are on 2 separate lines.

I have my database entered and "price" as my field range, but my
criteria
range is wrong. I am using Office XP. How do I set this up?

T Lodge



--
Clivey_UK
------------------------------------------------------------------------
Clivey_UK's Profile: http://www.excelforum.com/member.php...o&userid=32569
View this thread: http://www.excelforum.com/showthread...hreadid=524948

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove
 
Posts: n/a
Default How do I use DCount to exclude data?

Clivey_UK wrote...
Looking at Excel's Help File on Dcount (specifically the Criteria
Examples section), it may be that you need to have the two prices on
the same row; . . .

Chick N Egg Wrote:
I am trying to exclude price ranges from <100,000 to 150,000 from my
database, my criteria range is B9:C10.
Price <100000
Price 150000
These are on 2 separate lines.

I have my database entered and "price" as my field range, but my
criteria range is wrong.


OP is correct, the criteria range is screwed up. AND criteria need to
appear in the same line in the criteria range, and the field names need
to appear in the top row of the criteria range just as they need to
appear in the top row of the data range. Also, criteria ranges specify
which records to select, NOT which records to exclude.

So the criteria range should look like

Price Price
=100000 <=150000


Alternatively, if the Price column of the data range were column G and
the first record of the data range were in row 5, the criteria could be
combined in a criteria range with a blank cell in the top row and a
formula in the second row. Like so.

<blank
=AND(G5=100000,G5<=150000)

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exclude data from summary totals when hidden XVOTE Excel Worksheet Functions 1 April 13th 06 03:37 PM
ranking query JaimeTimbrell Excel Discussion (Misc queries) 2 February 16th 06 08:09 AM
exclude data already imported in excel Ashley Bowles Excel Discussion (Misc queries) 2 January 4th 06 07:12 PM
Excel Macro to Copy & Paste [email protected] Excel Worksheet Functions 0 December 1st 05 01:56 PM
Line Graph Data Recognition Nat Charts and Charting in Excel 2 April 30th 05 02:07 PM


All times are GMT +1. The time now is 09:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"