Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Date & Time Calculation

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Date & Time Calculation

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" wrote in message
...
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
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
date/time calculation eski Excel Worksheet Functions 3 December 30th 08 08:05 AM
Date & Time Calculation Vikram Dhemare Excel Discussion (Misc queries) 2 September 30th 08 03:18 PM
formula date and time calculation changetires Excel Discussion (Misc queries) 8 June 27th 06 03:01 PM
Ignoring Time in a Date Time Calculation nmp Excel Worksheet Functions 3 November 23rd 05 08:32 PM
time/date calculation bladelock Excel Worksheet Functions 2 November 10th 05 01:11 AM


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

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

About Us

"It's about Microsoft Excel"