Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing Options | Excel Discussion (Misc queries) | |||
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing | Excel Discussion (Misc queries) | |||
Populate a cell if values in cell 1 and cell 2 match cell 3 and 4 | Excel Worksheet Functions | |||
How to create/run "cell A equals Cell B put Cell C info in Cell D | Excel Discussion (Misc queries) | |||
Question: Cell formula or macro to write result of one cell to another cell | Excel Programming |