Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ram Ram is offline
external usenet poster
 
Posts: 138
Default VB multiple criteria countif change event

I was looking for help on the following:

Cell A1 is a sum of range b1:b10.
When the value in cell a1 changes i would like the following to happen in
cell C1

give me A count from a range where the date = 1/1/2006 and total 0

Date Total
1/1/2006 60
2/1/2006 30
1/1/2006 0

in this example C1 would be 60

Thanks for nay help




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default VB multiple criteria countif change event

=sumproduct(--(B1:B10=DateValue("1/1/2006")),--(C1:C100),C1:C10)

if values in C1:C10 will always be positive or zero

=Sumif(B1:B10,"1/1/2006",C1:C10)

--
Regards,
Tom Ogilvy


"ram" wrote:

I was looking for help on the following:

Cell A1 is a sum of range b1:b10.
When the value in cell a1 changes i would like the following to happen in
cell C1

give me A count from a range where the date = 1/1/2006 and total 0

Date Total
1/1/2006 60
2/1/2006 30
1/1/2006 0

in this example C1 would be 60

Thanks for nay help




  #3   Report Post  
Posted to microsoft.public.excel.programming
Ram Ram is offline
external usenet poster
 
Posts: 138
Default VB multiple criteria countif change event

HI Tom,

Thanks for the response, however i made an error in my post.
in the example the result for c1 should be 1

Thanks for any help



"Tom Ogilvy" wrote:

=sumproduct(--(B1:B10=DateValue("1/1/2006")),--(C1:C100),C1:C10)

if values in C1:C10 will always be positive or zero

=Sumif(B1:B10,"1/1/2006",C1:C10)

--
Regards,
Tom Ogilvy


"ram" wrote:

I was looking for help on the following:

Cell A1 is a sum of range b1:b10.
When the value in cell a1 changes i would like the following to happen in
cell C1

give me A count from a range where the date = 1/1/2006 and total 0

Date Total
1/1/2006 60
2/1/2006 30
1/1/2006 0

in this example C1 would be 60

Thanks for nay help




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default VB multiple criteria countif change event

=sumproduct(--(B1:B10=DateValue("1/1/2006")),--(C1:C100))

--
Regards,
Tom Ogilvy



"ram" wrote:

HI Tom,

Thanks for the response, however i made an error in my post.
in the example the result for c1 should be 1

Thanks for any help



"Tom Ogilvy" wrote:

=sumproduct(--(B1:B10=DateValue("1/1/2006")),--(C1:C100),C1:C10)

if values in C1:C10 will always be positive or zero

=Sumif(B1:B10,"1/1/2006",C1:C10)

--
Regards,
Tom Ogilvy


"ram" wrote:

I was looking for help on the following:

Cell A1 is a sum of range b1:b10.
When the value in cell a1 changes i would like the following to happen in
cell C1

give me A count from a range where the date = 1/1/2006 and total 0

Date Total
1/1/2006 60
2/1/2006 30
1/1/2006 0

in this example C1 would be 60

Thanks for nay help




  #5   Report Post  
Posted to microsoft.public.excel.programming
Ram Ram is offline
external usenet poster
 
Posts: 138
Default VB multiple criteria countif change event

I have the formula working correctly, however, when I run the macros they are
moving very slow.

Any suggestion on how i can correct this problem?


Thanks



"Tom Ogilvy" wrote:

=sumproduct(--(B1:B10=DateValue("1/1/2006")),--(C1:C100),C1:C10)

if values in C1:C10 will always be positive or zero

=Sumif(B1:B10,"1/1/2006",C1:C10)

--
Regards,
Tom Ogilvy


"ram" wrote:

I was looking for help on the following:

Cell A1 is a sum of range b1:b10.
When the value in cell a1 changes i would like the following to happen in
cell C1

give me A count from a range where the date = 1/1/2006 and total 0

Date Total
1/1/2006 60
2/1/2006 30
1/1/2006 0

in this example C1 would be 60

Thanks for nay help






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default VB multiple criteria countif change event

If you think it is calculation slowing you down, try turning it off when you
run you macro. At the top

Application.Calculation = xlManual
Application.ScreenUpdating = False
Activesheet.DisplayPageBreaks = False
' your code


' don't turn the pagebreaks back on.
Application.ScreenUpdating = True
Application.Calculation = xlAutomatic

--
Regards,
Tom Ogilvy

"ram" wrote in message
...
I have the formula working correctly, however, when I run the macros they

are
moving very slow.

Any suggestion on how i can correct this problem?


Thanks



"Tom Ogilvy" wrote:

=sumproduct(--(B1:B10=DateValue("1/1/2006")),--(C1:C100),C1:C10)

if values in C1:C10 will always be positive or zero

=Sumif(B1:B10,"1/1/2006",C1:C10)

--
Regards,
Tom Ogilvy


"ram" wrote:

I was looking for help on the following:

Cell A1 is a sum of range b1:b10.
When the value in cell a1 changes i would like the following to happen

in
cell C1

give me A count from a range where the date = 1/1/2006 and total 0

Date Total
1/1/2006 60
2/1/2006 30
1/1/2006 0

in this example C1 would be 60

Thanks for nay help






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
countif with multiple criteria blswes Excel Discussion (Misc queries) 5 July 30th 08 04:46 PM
Nesting COUNTIF for multiple criteria in multiple columns NeedExcelHelp07 Excel Worksheet Functions 1 December 12th 07 05:47 PM
COUNTIF Multiple Criteria Lori Hornick Excel Programming 1 March 22nd 05 04:56 PM
Countif with multiple criteria and multiple worksheets JJ Excel Worksheet Functions 1 December 28th 04 06:37 PM
multiple criteria in a countif Jeff Excel Programming 1 June 29th 04 02:51 PM


All times are GMT +1. The time now is 01:31 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"