PC Review


Reply
Thread Tools Rate Thread

Date & Time Calculation

 
 
Vikram Dhemare
Guest
Posts: n/a
 
      30th Sep 2008
I am trying to evaluate sumproduct function with multiple conditions wherein
the system not satisfying the date condition. Can anybody help.
The columns I have is
A
Date & Time
27/09/08 18:52
27/09/08 18:52
30/09/08 18:52
I am trying the follwign Code
s = "Sumproduct((" & r & rngE.Address & "=""" & partno & """)*" & _
"(" & r & rngB.Address & ">=" & CDbl(opstk) & ")," & _
"(" & r & rngJ.Address & "))"
MsgBox s
m = Evaluate(s)
But the date condition is not satisfying in this case.
The variable is defined as date. Is I am going wrong. Help needed.

--
Thanks,
Vikram P. Dhemare
 
Reply With Quote
 
 
 
 
Bernie Deitrick
Guest
Posts: n/a
 
      30th Sep 2008
Vikram,

> I am trying the follwign Code


Your code example is incomplete? Where do you define the ranges? What is r? What is the type and
value of opstk? What is the value of s after the code runs your first line?

Perhaps, you could change

">=" & CDbl(opstk) & "),"

to this , if opstk is a number

">=DATEVALUE(" & Format(opstk,"mmm dd, yyyy") & "),"

or to this, if opstk is a date string

">=DATEVALUE(" & opstk & "),"

Answer my other questions and we'll go from there....


HTH,
Bernie
MS Excel MVP


"Vikram Dhemare" <(E-Mail Removed)> wrote in message
news:4C27D267-5D71-43BE-BEEC-(E-Mail Removed)...
>I am trying to evaluate sumproduct function with multiple conditions wherein
> the system not satisfying the date condition. Can anybody help.
> The columns I have is
> A
> Date & Time
> 27/09/08 18:52
> 27/09/08 18:52
> 30/09/08 18:52
> I am trying the follwign Code
> s = "Sumproduct((" & r & rngE.Address & "=""" & partno & """)*" & _
> "(" & r & rngB.Address & ">=" & CDbl(opstk) & ")," & _
> "(" & r & rngJ.Address & "))"
> MsgBox s
> m = Evaluate(s)
> But the date condition is not satisfying in this case.
> The variable is defined as date. Is I am going wrong. Help needed.
>
> --
> Thanks,
> Vikram P. Dhemare



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date/Time Calculation radiaz via AccessMonster.com Microsoft Access Queries 4 17th May 2006 11:36 PM
Ignoring Time in a Date Time Calculation =?Utf-8?B?bm1w?= Microsoft Excel Worksheet Functions 3 23rd Nov 2005 08:32 PM
Date and Time calculation sacravia Microsoft Excel Misc 1 20th Oct 2004 08:56 AM
Repost - Time Calculation After Date and Time. =?Utf-8?B?UnVzcw==?= Microsoft Excel Worksheet Functions 0 30th Mar 2004 12:16 PM
Date/Time Calculation victoriousone Microsoft Excel Misc 1 12th Dec 2003 03:55 PM


Features
 

Advertising
 

Newsgroups
 


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