Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Is this possible

Value1 Value2 Value3

Where the above are in cells A1, A2, and A3.

If a different cell has a formula =A1+A2, can we have a macro that would put
the translation in a cell below it, so it would look like =Value1+Value2?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Is this possible

Assuming the initial formula is in say C4. Then this would do it.

Sub ValuesInFormulaInstead()

Range("C4").Offset(1, 0).Formula = "=" & (Range("A1").Value) & "+" &
(Range("B1").Value)

End Sub

But why do this?

Paul


"Todd Virlee" wrote in message
...
Value1 Value2 Value3

Where the above are in cells A1, A2, and A3.

If a different cell has a formula =A1+A2, can we have a macro that would
put
the translation in a cell below it, so it would look like =Value1+Value2?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Is this possible

Are you looking for this?

="="&A1&"+"&A2

--
Rick (MVP - Excel)


"Todd Virlee" wrote in message ...
Value1 Value2 Value3

Where the above are in cells A1, A2, and A3.

If a different cell has a formula =A1+A2, can we have a macro that would put
the translation in a cell below it, so it would look like =Value1+Value2?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Is this possible

There is another program they use that uses the "friendly" names of their
columns so they want to be able to have a value to paste in the other
program. This macro would need to be dynamic to the cell they are on in the
sheet when they run the macro.

"Paul" wrote:

Assuming the initial formula is in say C4. Then this would do it.

Sub ValuesInFormulaInstead()

Range("C4").Offset(1, 0).Formula = "=" & (Range("A1").Value) & "+" &
(Range("B1").Value)

End Sub

But why do this?

Paul


"Todd Virlee" wrote in message
...
Value1 Value2 Value3

Where the above are in cells A1, A2, and A3.

If a different cell has a formula =A1+A2, can we have a macro that would
put
the translation in a cell below it, so it would look like =Value1+Value2?




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Is this possible

I think you have it .

"Rick Rothstein" wrote:

Are you looking for this?

="="&A1&"+"&A2

--
Rick (MVP - Excel)


"Todd Virlee" wrote in message ...
Value1 Value2 Value3

Where the above are in cells A1, A2, and A3.

If a different cell has a formula =A1+A2, can we have a macro that would put
the translation in a cell below it, so it would look like =Value1+Value2?


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



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