Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using Code names in formulas
I think she means the worksheet's codename, not a variable value. Check
Dave's response to see how it works. -- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "ducky" wrote in message ups.com... Barb Reinhardt wrote: I've asked this elsewhere, but thought I'd put it up for more to see. I have the following formula in my code: Cells(i, "E").FormulaR1C1 = _ "=SUMPRODUCT(--('TESTING WORKSHEET'!R13C4:R20C4='Detail Worksheet'!RC2),('TESTING WORKSHEET'!R13C18:R20C18))" The code name for "TESTING WORKSHEET" is "TEST" and the code name for "Detail Worksheet" is "DETAIL". I want to use the codename in the formula. How do I do this? Thanks, When you say code name, i think you mean variable. if that is what you are trying to accomplish, you need to put your names into a string variable. something like this: dim TestWS as string dim DetailWS as string 'make sure that you assign these variables a value at some point. then to step in and out of the formula, it would look like this: "=SUMPRODUCT(--('" & TestWS &"'!R13C4:R20C4='" & DetailWS & " '!RC2),('" & TestWS &" '!R13C18:R20C18))" hope this helps AR |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
using the Excel generic worksheet names instead of user-given names in code | Excel Discussion (Misc queries) | |||
Variable Names in Formulas | Excel Discussion (Misc queries) | |||
Using Sheet names in formulas | Excel Worksheet Functions | |||
USING NAMES IN FORMULAS | Excel Worksheet Functions | |||
Using Sheet names in formulas | Excel Programming |