Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using a function in a macros to enter data in a specified cell
I have identified a cell address using the "address" function. I would like
to use the identified address to enter data into a cell using a macros. Would someone please help? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using a function in a macros to enter data in a specified cell
If you have the address of a cell in a variable, say sAddr, you
can use this variable with the Range property to access that cell. For example, Dim sAddr As String sAddr = "A1" Range(sAddr).Value = 123 -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "MaxRussell" wrote in message ... I have identified a cell address using the "address" function. I would like to use the identified address to enter data into a cell using a macros. Would someone please help? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using a function in a macros to enter data in a specified cell
If I understand your question, then it is very straight forward. Th example below takes the values in cells D1 through D5, adds them up an puts the result in the cell where you grabbed the address (in this cas cell A1). MyAddress = Range("A1").Address Application.Sheets("Sheet1").Range(MyAddress).Form ula = "=sum(D1:D5) -- FuzzyDov ----------------------------------------------------------------------- FuzzyDove's Profile: http://www.excelforum.com/member.php...fo&userid=1667 View this thread: http://www.excelforum.com/showthread.php?threadid=32063 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Enter data into a cell that already has a function. | Excel Worksheet Functions | |||
Auto enter date when data in enter in another cell | Excel Worksheet Functions | |||
macros doesn't execute unless i go into cell and press enter. | Excel Discussion (Misc queries) | |||
How to Enter data and Function in same cell | Excel Discussion (Misc queries) | |||
Enter data and display function result in same cell | Excel Discussion (Misc queries) |