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

Hi,
Could someone assist with this problem.
Thankyou


In T8 there is a heading.
T9:T110 is a data range.

I have various macros that compute groups of data which I
need to add cumulatively to the range.

The first click of a new macro must add data starting at
T9 down, say T9:T30.
The next one must add it's data to T31:?
And so on.

How do I make a macro that always starts adding data from
T9 and then with each subsequent click, adds the groups of
data from the bottom of the last data cell downwards.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 179
Default Macro to add data

Rick

To find the next available cell in column T, use code like this

Range("T65536").End(xlUp).Offset(1,0)

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Rick" wrote in message
...
Hi,
Could someone assist with this problem.
Thankyou


In T8 there is a heading.
T9:T110 is a data range.

I have various macros that compute groups of data which I
need to add cumulatively to the range.

The first click of a new macro must add data starting at
T9 down, say T9:T30.
The next one must add it's data to T31:?
And so on.

How do I make a macro that always starts adding data from
T9 and then with each subsequent click, adds the groups of
data from the bottom of the last data cell downwards.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Macro to add data

Sub Tester2()
Dim rng As Range
If IsEmpty(Range("T9")) Then
Set rng = Range("T9")
Else
Set rng = Range("T9:T110").SpecialCells(xlConstants)
Set rng = rng.Areas(rng.Areas.Count)
Set rng = rng(rng.Count)
Set rng = rng.Offset(1, 0)
End If
' no add data starting at rng
MsgBox "Start of new data is at " & rng.Address


End Sub

--
Regards,
Tom Ogilvy



"Rick" wrote in message
...
Hi,
Could someone assist with this problem.
Thankyou


In T8 there is a heading.
T9:T110 is a data range.

I have various macros that compute groups of data which I
need to add cumulatively to the range.

The first click of a new macro must add data starting at
T9 down, say T9:T30.
The next one must add it's data to T31:?
And so on.

How do I make a macro that always starts adding data from
T9 and then with each subsequent click, adds the groups of
data from the bottom of the last data cell downwards.



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 to copy data when data is detected in another column(s). Richard Excel Worksheet Functions 2 October 23rd 09 11:46 PM
Write Macro to Fix Data Alignment (Data dump from Crystal to Excel Karin Excel Discussion (Misc queries) 2 September 22nd 09 05:31 PM
Macro to move data to different column based on data in another co malycom Excel Discussion (Misc queries) 3 August 2nd 05 07:07 PM
is it possible to execute write to the fields in another .xsl form a macro in another .xsl? e.g. some way to load another .xsl into an .xsl macro and write to its data? Daniel Excel Worksheet Functions 1 June 23rd 05 11:38 PM
enter data in cell which will start macro to move data to sheet2 Tommy Excel Discussion (Misc queries) 0 May 12th 05 05:00 PM


All times are GMT +1. The time now is 05:04 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"