Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Macro Help Needed

I want to write a macro that will start at cell A1 and go to A2 then to A3
and so on until it finds the first blank cell. At that point I want it to
stop at that blank cell so I can have it automatically write text in it. I
also need it to remember where it stopped so I can have it move over to
column B at the same row. I guess I just need to know how to make the active
cell move around with a macro to where I need it to be. Any help will be
greatly appreciated.

Dan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default Macro Help Needed

Hi, give this a try:
'################################################# ########
Sub UpdateText
Dim CountData&
Dim myTextStringA$, myTextStringB$
CountData = ActiveSheet.Cells(Rows.Count, "A").End(xlUp).Row
Cells(CountData + 1, 1) = myTextStringA
Cells(CountData + 1, 2).Select
' Or if you want to insert another string...
' Cells(CountData + 1, 2) = myTextStringB
End Sub
'################################################# ########
HTH--Lonnie M.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default Macro Help Needed

FYI:
The Convention Cells(X,Y)
'X' = row number
'Y' = column number
I.E. the cell A3 = Cells(3,1); B1 = Cells(1, 2)

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro Help Needed

Thanks, all that info helped a lot.

Now I need to be able to put an array formula in that cell and fill it
across. The formula needs to have the CountData variable in it. This is
what I have so far but it doesn't like it:

=Average(IF(B5:Bx$H$2, IF(B5:Bx<$I$2, B5:Bx,""),"")) where "x" is CountData

Any ideas??

"Lonnie M." wrote:

FYI:
The Convention Cells(X,Y)
'X' = row number
'Y' = column number
I.E. the cell A3 = Cells(3,1); B1 = Cells(1, 2)


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
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
Help needed on Macro Gary Excel Worksheet Functions 8 September 6th 06 10:33 PM
Macro Help needed tamato43 Excel Discussion (Misc queries) 1 August 19th 05 01:48 AM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 1 June 11th 05 12:44 AM
Macro needed to Paste Values and prevent Macro operation thunderfoot Excel Discussion (Misc queries) 0 June 10th 05 03:38 PM


All times are GMT +1. The time now is 04:20 AM.

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"