LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Excel VBA Last Empty Row VBA paste Array elements

I have a array and the array size is 1 to 5.

So far my macro pastes values into Column A, worksheet Sheet1 and Cells
A2:A6

- What I would like is a amendment to this macro so it identifies the
last
empty cell in column A and then paste the additional array elements in
that column A list.

- Because the array data elements is always updated and exported in MS
Excel, the last
empty cell in column A is not fixed.

Is this doable and many thanks in-advance.


Public Sub AddtoWorksheet()

Dim myArray(1 To 5) As String


myArray(1) = "Value1"
myArray(2) = "Value2"
myArray(3) = "Value3"
myArray(4) = "Value4"
myArray(5) = "Value5"


Worksheets("Sheet1").Select

range("A2:A" & UBound(myArray) + 1) =
WorksheetFunction.Transpose(myArray)


End Sub

 
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
Non-unique elements in an array Andrew Excel Discussion (Misc queries) 1 August 22nd 05 11:58 AM
Number of elements in an array Neal Zimm Excel Programming 4 August 12th 05 11:30 AM
Refer to Elements in an array Derick[_2_] Excel Programming 3 February 9th 05 02:25 AM
Count elements in array Jason Morin[_3_] Excel Programming 7 January 31st 05 09:32 PM
Differentiate between "" and Empty in array elements. RB Smissaert Excel Programming 3 January 2nd 04 09:01 PM


All times are GMT +1. The time now is 11:26 AM.

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

About Us

"It's about Microsoft Excel"