Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default how to replace cell references with actual numbers

i need to find a shortcut, maybe a marco to replace the formula the
refers to cell references on another worksheet to dispay actual
numbers.

For example, I have =sum(Sheet1!B5+Sheet1B4) in sheet2, and i need to
have =sum(14+15), where B5=14 and B4=15 in sheet2.

please help, i have a really, really long list to work with and
wouldn't want to do this by hand....

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default how to replace cell references with actual numbers

Would it be acceptable to simply have the cell that is doing the referencing
have the equivalent of =29 in it? After all =SUM(14+15) does equal 29.

If so, you can use Edit | Copy combined with Edit | Paste Special and choose
the [Values] option in the Paste Special dialog.

How to use it:
highlight all of the cells with the formulas you want to convert to "hard"
numbers and use Edit | Copy, then without unselecting anything, turn right
around and choose Edit | Past Special and make sure that the [Values] option
is selected and hit OK. Then the cell with =Sum(Sheet1!B5+Sheet1!B4) will
simply have 29 placed into it.

Hope this helps some.

" wrote:

i need to find a shortcut, maybe a marco to replace the formula the
refers to cell references on another worksheet to dispay actual
numbers.

For example, I have =sum(Sheet1!B5+Sheet1B4) in sheet2, and i need to
have =sum(14+15), where B5=14 and B4=15 in sheet2.

please help, i have a really, really long list to work with and
wouldn't want to do this by hand....


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default how to replace cell references with actual numbers

Thank you JLatham,
I wish I could use this, but they want actual numbers in formula
format.

On Nov 20, 10:59 am, JLatham <HelpFrom @ Jlathamsite.com.(removethis)
wrote:
Would it be acceptable to simply have the cell that is doing the referencing
have the equivalent of =29 in it? After all =SUM(14+15) does equal 29.

If so, you can use Edit | Copy combined with Edit | Paste Special and choose
the [Values] option in the Paste Special dialog.

How to use it:
highlight all of the cells with the formulas you want to convert to "hard"
numbers and use Edit | Copy, then without unselecting anything, turn right
around and choose Edit | Past Special and make sure that the [Values] option
is selected and hit OK. Then the cell with =Sum(Sheet1!B5+Sheet1!B4) will
simply have 29 placed into it.

Hope this helps some.



" wrote:
i need to find a shortcut, maybe a marco to replace the formula the
refers to cell references on another worksheet to dispay actual
numbers.


For example, I have =sum(Sheet1!B5+Sheet1B4) in sheet2, and i need to
have =sum(14+15), where B5=14 and B4=15 in sheet2.


please help, i have a really, really long list to work with and
wouldn't want to do this by hand....- Hide quoted text -- Show quoted text -


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default how to replace cell references with actual numbers

We could do this with VBA in a macro, but to even suggest the code I'd need
to have an idea of:
The sheet names that need the conversions made in
The range of cells on those sheets we need to look at

Or I might be able to do it by just knowing the name of the sheet(s) that
represent what you've shown as Sheet1 in your examples.

In VBA you can examine the .Formula property and you can create new formulas
to replace an existing formula.

The process would generally be to look at a cell and examine it's .Formula
property and if the name of the 'foreign/source' sheet was mentioned in it,
then determine the source value(s) and rewrite the formula to use the actual
source values. In that fashion, with a little effort, you could change
=SUM(Sheet1!B5+Sheet1!B4)
to
=SUM(14+15)
or any other formula that happened to be in there. It's primarily a problem
involving parsing a string (the formula) complicated a little by determining
where the external reference ends at. And if that source sheet is in another
workbook, that would need to be known and factored in also. Best/easiest if
all concerned sheets are in the same workbook, at least during the use of the
code.

" wrote:

Thank you JLatham,
I wish I could use this, but they want actual numbers in formula
format.

On Nov 20, 10:59 am, JLatham <HelpFrom @ Jlathamsite.com.(removethis)
wrote:
Would it be acceptable to simply have the cell that is doing the referencing
have the equivalent of =29 in it? After all =SUM(14+15) does equal 29.

If so, you can use Edit | Copy combined with Edit | Paste Special and choose
the [Values] option in the Paste Special dialog.

How to use it:
highlight all of the cells with the formulas you want to convert to "hard"
numbers and use Edit | Copy, then without unselecting anything, turn right
around and choose Edit | Past Special and make sure that the [Values] option
is selected and hit OK. Then the cell with =Sum(Sheet1!B5+Sheet1!B4) will
simply have 29 placed into it.

Hope this helps some.



" wrote:
i need to find a shortcut, maybe a marco to replace the formula the
refers to cell references on another worksheet to dispay actual
numbers.


For example, I have =sum(Sheet1!B5+Sheet1B4) in sheet2, and i need to
have =sum(14+15), where B5=14 and B4=15 in sheet2.


please help, i have a really, really long list to work with and
wouldn't want to do this by hand....- Hide quoted text -- Show quoted text -



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 618
Default how to replace cell references with actual numbers

You could display what you ask for by the formula
="=sum("&Sheet1!B4&"+"&Sheet1!B5&")"
but of course it won't evaluate it. If you want to evaluate it you can use
the real formula in another cell [or you can use the EVALUATE() function in
a named reference].

Note also that you don't need the word SUM in your formula. The formula
could have been =(Sheet1!B5+Sheet1B4) or =(14+15).
--
David Biddulph

wrote in message
oups.com...
i need to find a shortcut, maybe a marco to replace the formula the
refers to cell references on another worksheet to dispay actual
numbers.

For example, I have =sum(Sheet1!B5+Sheet1B4) in sheet2, and i need to
have =sum(14+15), where B5=14 and B4=15 in sheet2.

please help, i have a really, really long list to work with and
wouldn't want to do this by hand....





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default how to replace cell references with actual numbers

Thanks for replying to my posts. I took all the suggestions and came up

with this scheme:

1. ="type this around the entire formula"
2. "&type this around the specific cell reference&"
3. copy the cells, and paste special as values
4. now the new formula will be displayed, but excel will see it as text
make sure that the cell format is set to general, or number
5. create a macro:
-enter ALT+F11
-go to insert, module
-type this in the module:
Sub Enter_Values()
For Each xCell In Selection
xCell.Value = xCell.Value
Next xCell
End Sub
6. On the spreadsheet, select the cells you're working on
& run the macro Enter_Values (ALT+F8)
7. that did it for me


On Nov 20, 3:25 pm, "David Biddulph" wrote:
You could display what you ask for by the formula
="=sum("&Sheet1!B4&"+"&Sheet1!B5&")"
but of course it won't evaluate it. If you want to evaluate it you can use
the real formula in anothercell[or you can use the EVALUATE() function in
a named reference].

Note also that you don't need the word SUM in your formula. The formula
could have been =(Sheet1!B5+Sheet1B4) or =(14+15).
--
David Biddulph

wrote in ooglegroups.com...



i need to find a shortcut, maybe a marco toreplacethe formula the
refers tocellreferenceson another worksheet to dispay actual
numbers.


For example, I have =sum(Sheet1!B5+Sheet1B4) in sheet2, and i need to
have =sum(14+15), where B5=14 and B4=15 in sheet2.


please help, i have a really, really long list to work with and
wouldn't want to do this by hand....- Hide quoted text -- Show quoted text -


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
Cell References [email protected] Excel Discussion (Misc queries) 2 November 15th 06 11:37 PM
Completely baffled on what should be simple Pat Hughes Excel Discussion (Misc queries) 12 October 23rd 06 08:24 PM
Excel - copy absolute cell references (within the range) as relati Merf1013 Excel Discussion (Misc queries) 1 October 10th 06 07:46 AM
Using Find & Replace to edit cell references in links Matt7102 Excel Discussion (Misc queries) 0 March 15th 06 08:50 PM
Adding a row to worksheet does not update cell references in another. blausen Excel Worksheet Functions 5 February 25th 06 09:14 PM


All times are GMT +1. The time now is 12:15 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"