ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Is this possible (https://www.excelbanter.com/excel-programming/423894-possible.html)

Todd Virlee

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?

Paul

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?




Rick Rothstein

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?


Todd Virlee

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?





Todd Virlee

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?




All times are GMT +1. The time now is 09:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com