![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Location: England
Posts: 10
|
Alright. A simple version of what i want is this...
I have a value (money) in cell A1 and i want it to be added to cell A2. The thing is i want the macro to look at the value in B1 (which is A2) to direct it to A2. This is a simplified version of what i want but if you could explain it to me using this it would realy realy help a lot. |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
|
The following formula will work:
=A1+INDIRECT(B1) It isn't VB though. This formula adds A1 to the A2 if the text "A2" is in cell B1.
__________________
Kind regards, Al Chara |
|
|
|
|
|
#3 |
|
New Member
Join Date: Apr 2002
Location: England
Posts: 10
|
thanks, but what i need is for it to run through a macro. Its for an order form you see. And when an order is processed i intend to add this so that it will add a value to another when the order is processed.
if anyone can help further... please do! |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Location: Guderup, Denmark
Posts: 287
|
This piece of takes the value of A1 and places it in the cell that is written in B1
Sub test200() Range([b1].Text).Value = range([b1].test).value+ [a1].Value End Sub regards Tommy [ This Message was edited by: Tommy Bak on 2002-04-09 06:55 ] |
|
|
|
|
|
#5 |
|
New Member
Join Date: Apr 2002
Posts: 6
|
using VB it would be something like:
myMoney=range("A1")+range(range("B1")) |
|
|
|
|
|
#6 |
|
New Member
Join Date: Apr 2002
Location: England
Posts: 10
|
ok, i'll try it out. thanks
|
|
|
|
|
|
#7 |
|
Board Regular
Join Date: Feb 2002
Location: Perth Australia
Posts: 1,567
|
Hi there Try this bit of code: Range(Range("B1").Value).Value =Range(Range("B1").Value).Value + Range("A1").Value regards Derek |
|
|
|
|
|
#8 |
|
New Member
Join Date: Apr 2002
Location: England
Posts: 10
|
ok, thanks guys. this is a great board. i think i have it solved. if not, i will be back. but THANKS to everyone who replied an helped out.
No doubt i will be back soon. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|