Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Enter data into a cell that already has a function. alwayslearning Excel Worksheet Functions 2 October 25th 08 05:31 PM
Auto enter date when data in enter in another cell Brian Excel Worksheet Functions 5 December 7th 06 06:44 PM
macros doesn't execute unless i go into cell and press enter. Emma Excel Discussion (Misc queries) 2 October 20th 06 05:12 PM
How to Enter data and Function in same cell [email protected] Excel Discussion (Misc queries) 3 October 2nd 06 07:10 PM
Enter data and display function result in same cell ChrisR Excel Discussion (Misc queries) 1 June 21st 06 12:15 AM


All times are GMT +1. The time now is 12:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"