Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 380
Default 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
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
using the Excel generic worksheet names instead of user-given names in code Paul Excel Discussion (Misc queries) 5 June 26th 09 08:44 PM
Variable Names in Formulas Paulo Excel Discussion (Misc queries) 2 March 29th 06 01:16 PM
Using Sheet names in formulas Kirk Excel Worksheet Functions 1 August 24th 05 08:23 AM
USING NAMES IN FORMULAS Bill R Excel Worksheet Functions 2 August 18th 05 10:17 PM
Using Sheet names in formulas bsullins Excel Programming 3 July 15th 04 11:22 PM


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

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

About Us

"It's about Microsoft Excel"