Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
variable not reading correctly using sumproduct
I am using the following code in my project.
Dim CustomDate as String CustomDate = DateTextBox.text stagedtotal = Worksheets("sheet1").Evaluate("=SUMPRODUCT(--(Am1:Am60000 _ " & CustomDate & "),--(AC1:AC60000 = ""P""),--(AQ1:AQ60000 _ = ""Y""),Bn1:Bn60000)") However it seems to be returning the CustomDate value incorrectly. no matter what date is entered it returns the total value of BN1:BN60000 (well the total within the other parameters set in the formula). However if i change to < it returns a total of 0. I am thinking it must not be reading the CustomDate at all, or reading it as 0 Any help is much appreciated. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
SUMPRODUCT calcs correctly on one PC, but incorrectly on another | Excel Discussion (Misc queries) | |||
sumproduct - reading a variable value | Excel Discussion (Misc queries) | |||
reading comments value into a string variable | Excel Programming | |||
Using SUMPRODUCT...but prolly not correctly | Excel Worksheet Functions | |||
Reading Textfile into a variable | Excel Programming |