Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reference Worksheet Name variable in VBA formula
Having trouble using variable in SUMPRODUCT formula...any help/comments
appreciated. I don't know how to use quotation marks (double or single) correctly. Dim FPsh = ActiveSheet.Name 'assign whsht name as variable FPsh Worksheets("2005").Select Range("E6").Formula = "=SUMPRODUCT((" & FPsh & "!$E$1:$E$1000=$C6)*" & "(" & FPsh & "!$B$1:$B$1000(--(""2004/12/31"")))*" & "((" & FPsh & "!$B$1:$B$1000<(--(G$4))))*" & "(((" & FPsh & "!$J$1:$J$1000)" & ")" Many thanks...Mike |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
making a portion of reference to a worksheet variable in a formula | Excel Discussion (Misc queries) | |||
Variable column reference in formula | Excel Discussion (Misc queries) | |||
Vlookup with variable worksheet reference | Excel Worksheet Functions | |||
how to reference a worksheet with a variable vs a name | Excel Programming | |||
Making a file and worksheet reference into a variable.... | Excel Worksheet Functions |