Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to copy data when data is detected in another column(s). | Excel Worksheet Functions | |||
Write Macro to Fix Data Alignment (Data dump from Crystal to Excel | Excel Discussion (Misc queries) | |||
Macro to move data to different column based on data in another co | Excel Discussion (Misc queries) | |||
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? | Excel Worksheet Functions | |||
enter data in cell which will start macro to move data to sheet2 | Excel Discussion (Misc queries) |