ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Obtaining a value from a cell and using it in a macro (https://www.excelbanter.com/excel-programming/372166-obtaining-value-cell-using-macro.html)

Andy

Obtaining a value from a cell and using it in a macro
 
Hi.

I want to create a macro that iterates around several formulas and
spits out a final result. The spreadsheet will have several cells that
need to have values entered into it by the user. I then want the user
to hit a button embbeded into the sheet that starts the calculations.
This will require the macro to get the values entered from the cell,
give them a name, and use it in subsequent calculations. I am sure this
is really, really easy to do


[email protected]

Obtaining a value from a cell and using it in a macro
 
Dim MyName as long 'MyName is the name you want, LONG etc are the type
of value
MyName=range("A1").value

should get you started


Andy wrote:

Hi.

I want to create a macro that iterates around several formulas and
spits out a final result. The spreadsheet will have several cells that
need to have values entered into it by the user. I then want the user
to hit a button embbeded into the sheet that starts the calculations.
This will require the macro to get the values entered from the cell,
give them a name, and use it in subsequent calculations. I am sure this
is really, really easy to do




All times are GMT +1. The time now is 11:45 PM.

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