Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Using named variables
I have a user who wants to be able to have a variable (x, e.g.) displayed in
her worksheet, but she wants to be able to assign a value to x, then use the sum function on rows or columns that include x. I told her how to use a name, but she really really wants the sheet to display the name, not the value, and I have been unable to make Excel do that. Is it even possible, without fancy VB scripting? Thanks in advance, even if the answer is no |
#2
|
|||
|
|||
Hi,
I didnt understand your question very properly but have you tried using the SUMIF function for you problem. thanks, Hitesh "Jessica" wrote: I have a user who wants to be able to have a variable (x, e.g.) displayed in her worksheet, but she wants to be able to assign a value to x, then use the sum function on rows or columns that include x. I told her how to use a name, but she really really wants the sheet to display the name, not the value, and I have been unable to make Excel do that. Is it even possible, without fancy VB scripting? Thanks in advance, even if the answer is no |
#3
|
|||
|
|||
You can use Named Ranges. Hit Ctrl + F3, to bring up the Names dialog box.
Type in the desired name, e.g. "x". Then go to the 'Refers to' box and type in your value. I would suggest to not use these too often and use with caution; they can bloat a workbook extremely fast. Plus they are hard to troubleshoot and use more overhead than just inputting the value. You can reference a number or a cell using this method. -- Regards, Zack Barresse, aka firefytr "Jessica" wrote in message ... I have a user who wants to be able to have a variable (x, e.g.) displayed in her worksheet, but she wants to be able to assign a value to x, then use the sum function on rows or columns that include x. I told her how to use a name, but she really really wants the sheet to display the name, not the value, and I have been unable to make Excel do that. Is it even possible, without fancy VB scripting? Thanks in advance, even if the answer is no |
#4
|
|||
|
|||
Well, right, I told the person to use named ranges, but when you are using a
name, and you type =x in a cell, the value of x is displayed, not x. She wants x to be equal to ten, but she wants the cell to show the letter x, not the number ten, but she wants to add x + 2 +3 and have the answer be 15. It's starting to look less and less possible "Zack Barresse" wrote: You can use Named Ranges. Hit Ctrl + F3, to bring up the Names dialog box. Type in the desired name, e.g. "x". Then go to the 'Refers to' box and type in your value. I would suggest to not use these too often and use with caution; they can bloat a workbook extremely fast. Plus they are hard to troubleshoot and use more overhead than just inputting the value. You can reference a number or a cell using this method. -- Regards, Zack Barresse, aka firefytr "Jessica" wrote in message ... I have a user who wants to be able to have a variable (x, e.g.) displayed in her worksheet, but she wants to be able to assign a value to x, then use the sum function on rows or columns that include x. I told her how to use a name, but she really really wants the sheet to display the name, not the value, and I have been unable to make Excel do that. Is it even possible, without fancy VB scripting? Thanks in advance, even if the answer is no |
#5
|
|||
|
|||
Hmm, not sure what happend to my last reply, I'll try this again.
Unless your friend wanted to toggle to Formula view (seeing all formulas and not their equated values) by hitting Ctrl + ~, then I don't know of any way to do what they have requested. Sorry. -- Regards, Zack Barresse, aka firefytr "Jessica" wrote in message ... Well, right, I told the person to use named ranges, but when you are using a name, and you type =x in a cell, the value of x is displayed, not x. She wants x to be equal to ten, but she wants the cell to show the letter x, not the number ten, but she wants to add x + 2 +3 and have the answer be 15. It's starting to look less and less possible "Zack Barresse" wrote: You can use Named Ranges. Hit Ctrl + F3, to bring up the Names dialog box. Type in the desired name, e.g. "x". Then go to the 'Refers to' box and type in your value. I would suggest to not use these too often and use with caution; they can bloat a workbook extremely fast. Plus they are hard to troubleshoot and use more overhead than just inputting the value. You can reference a number or a cell using this method. -- Regards, Zack Barresse, aka firefytr "Jessica" wrote in message ... I have a user who wants to be able to have a variable (x, e.g.) displayed in her worksheet, but she wants to be able to assign a value to x, then use the sum function on rows or columns that include x. I told her how to use a name, but she really really wants the sheet to display the name, not the value, and I have been unable to make Excel do that. Is it even possible, without fancy VB scripting? Thanks in advance, even if the answer is no |
#6
|
|||
|
|||
If you name the range and are in Formula View (Ctrl + ~) then you will see:
=x+2+3 ... or whatever. You won't see the value of 'x'. But you must be in formula view. You could always stay out of formula view and use another cell to show the contents of the formula. An example can be found here... http://www.vbaexpress.com/kb/getarticle.php?kb_id=62 HTH -- Regards, Zack Barresse, aka firefytr "Jessica" wrote in message ... Well, right, I told the person to use named ranges, but when you are using a name, and you type =x in a cell, the value of x is displayed, not x. She wants x to be equal to ten, but she wants the cell to show the letter x, not the number ten, but she wants to add x + 2 +3 and have the answer be 15. It's starting to look less and less possible "Zack Barresse" wrote: You can use Named Ranges. Hit Ctrl + F3, to bring up the Names dialog box. Type in the desired name, e.g. "x". Then go to the 'Refers to' box and type in your value. I would suggest to not use these too often and use with caution; they can bloat a workbook extremely fast. Plus they are hard to troubleshoot and use more overhead than just inputting the value. You can reference a number or a cell using this method. -- Regards, Zack Barresse, aka firefytr "Jessica" wrote in message ... I have a user who wants to be able to have a variable (x, e.g.) displayed in her worksheet, but she wants to be able to assign a value to x, then use the sum function on rows or columns that include x. I told her how to use a name, but she really really wants the sheet to display the name, not the value, and I have been unable to make Excel do that. Is it even possible, without fancy VB scripting? Thanks in advance, even if the answer is no |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Dynamic named range across multiple sheets | Excel Discussion (Misc queries) | |||
referencing named formula using INDIRECT function | Excel Worksheet Functions | |||
can't move a named cell without breaking a hyperlink to that cell | Links and Linking in Excel | |||
Named Cell Ranges | Excel Discussion (Misc queries) | |||
Named dynamic ranges, copied worksheets and graph source data | Charts and Charting in Excel |