![]() |
Cell Value
Hi there,
i am a newbie in excel vba and i made a simple macro but i miss something there. it is a macro that selects value of cell "A1" and then paste it in cell "B1" quite simple ?, but my PROBLEM is that: the cell value "A1" isn't numbers (it is something like 3+2*2) so when i paste it in "B1" i get the same result of "A1" while i want to evalute "A1" , so any ideas. THANX. |
Cell Value
Hi Dodo,
Try: Range("B1").Value = Range("A1").Value --- Regards, Norman "dodo" wrote in message ... Hi there, i am a newbie in excel vba and i made a simple macro but i miss something there. it is a macro that selects value of cell "A1" and then paste it in cell "B1" quite simple ?, but my PROBLEM is that: the cell value "A1" isn't numbers (it is something like 3+2*2) so when i paste it in "B1" i get the same result of "A1" while i want to evalute "A1" , so any ideas. THANX. |
Cell Value
hi there,
sorry, i still have the same error, which is that the cell "B1" did not evalute the cell value "A1" (e.g. 2+3*2) . all i want is to add "=" before the contents of "A1" then evalute in "B1" thanx "Norman Jones" wrote in message ... Hi Dodo, Try: Range("B1").Value = Range("A1").Value --- Regards, Norman "dodo" wrote in message ... Hi there, i am a newbie in excel vba and i made a simple macro but i miss something there. it is a macro that selects value of cell "A1" and then paste it in cell "B1" quite simple ?, but my PROBLEM is that: the cell value "A1" isn't numbers (it is something like 3+2*2) so when i paste it in "B1" i get the same result of "A1" while i want to evalute "A1" , so any ideas. THANX. |
Cell Value
Hi Dodo,
Try: Range("B1").Value = Evaluate(Range("A1").Value) --- Regards, Norman "dodo" wrote in message ... hi there, sorry, i still have the same error, which is that the cell "B1" did not evalute the cell value "A1" (e.g. 2+3*2) . all i want is to add "=" before the contents of "A1" then evalute in "B1" thanx "Norman Jones" wrote in message ... Hi Dodo, Try: Range("B1").Value = Range("A1").Value --- Regards, Norman "dodo" wrote in message ... Hi there, i am a newbie in excel vba and i made a simple macro but i miss something there. it is a macro that selects value of cell "A1" and then paste it in cell "B1" quite simple ?, but my PROBLEM is that: the cell value "A1" isn't numbers (it is something like 3+2*2) so when i paste it in "B1" i get the same result of "A1" while i want to evalute "A1" , so any ideas. THANX. |
Cell Value
hi there,
that works for me but now i want to make the macro works in cells other than "A1" & "B1" e.g. take the numbers from cell "H4" for example and then evaluates it in the active cell (already solved). thanx |
Cell Value
Hi Dodo,
Try: Dim Rng1 As Range, Rng2 As Range Set Rng1 = ActiveCell Set Rng2 = Range("H4") Rng1.Value = Evaluate(Rng2.Value) --- Regards, Norman "dodo" wrote in message ... hi there, that works for me but now i want to make the macro works in cells other than "A1" & "B1" e.g. take the numbers from cell "H4" for example and then evaluates it in the active cell (already solved). thanx |
Cell Value
hi,
thanx Norman for the info so far but i still did not what i want to do. ur code: Dim Rng1 As Range, Rng2 As Range Set Rng1 = ActiveCell Set Rng2 = Range("H4") Rng1.Value = Evaluate(Rng2.Value) i did not mean "H4" to be constant, i want to make the Rng2 to be variable in any cell and so for Rng1. e.g. A B C 1 2+3*5 MACRO OF SUM A1*B1 2 7+3*1 MACRO OF SUM A2*B2 3 6+5*2 MACRO OF SUM A3*B3 is it possible? thank u |
All times are GMT +1. The time now is 05:28 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com