LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default A question about Counting in VBA

Ok, i'm having a little trouble with this, can i get some help?

The following basically says that for every sheet in the workboo
(whose name in the current month), count how many cells in range H1 t
H275 have today's date:

count= 0

For Each wks In Workbooks(Format(Date, "mmmm") & ".xls").Worksheets
count = count + Application.CountIf(wks.Range("H1:H275"), Date)
Next


...that works absolutely fine. Now, i'm trying to make it say the sam
thing, except this time count the cell ONLY if the cell has today's AN
the offset(0, -4) of the cell's value is "PICK UP".

I can't seem to be able to put in that 'and' part to it. I only kno
how to do a countif with only one condition. but my problem is that
need a countif done with conditions for the count this time.

any help would be GREATLY appreciated, thanks much

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

 
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
Counting question John Excel Worksheet Functions 16 June 4th 10 05:46 PM
Counting Question! Danny Boy Excel Worksheet Functions 9 January 26th 09 08:42 PM
Counting Question rlee1999 Excel Worksheet Functions 7 December 8th 06 09:00 PM
Counting question Brad Excel Worksheet Functions 1 May 8th 06 05:55 PM
Counting question sjs Excel Discussion (Misc queries) 5 December 2nd 04 09:24 AM


All times are GMT +1. The time now is 06:59 AM.

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"