Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Jessica
 
Posts: n/a
Default 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   Report Post  
HITESH
 
Posts: n/a
Default

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   Report Post  
Zack Barresse
 
Posts: n/a
Default

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   Report Post  
Jessica
 
Posts: n/a
Default

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   Report Post  
Zack Barresse
 
Posts: n/a
Default

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   Report Post  
Zack Barresse
 
Posts: n/a
Default

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
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
Dynamic named range across multiple sheets babycody Excel Discussion (Misc queries) 3 July 24th 05 06:03 AM
referencing named formula using INDIRECT function [email protected] Excel Worksheet Functions 19 May 11th 05 09:48 AM
can't move a named cell without breaking a hyperlink to that cell Snakeye Links and Linking in Excel 3 January 26th 05 11:57 PM
Named Cell Ranges Blackcat Excel Discussion (Misc queries) 7 December 9th 04 01:59 PM
Named dynamic ranges, copied worksheets and graph source data WP Charts and Charting in Excel 1 November 28th 04 05:19 PM


All times are GMT +1. The time now is 01:12 PM.

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"