Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I ......a horizontal list

Status
Not open for further replies.

jane2geo

Technical User
Joined
Oct 24, 2002
Messages
21
Location
US
I'm using VB to track dynamic data in excel. This code
Works nicely but I want my list to fill horizontally not vertically. Can the new data be added from left to right?
Keeping the most recent in the left most part of the range.
Thank you in advance.


Private Sub Worksheet_Calculate()
Dim Over As Range
Dim msb As Integer
Application.EnableEvents = False
For Each Over In Range("$G$3")
If Over.Value > 0 Then
With ThisWorkbook.Names("list1").RefersToRange.CurrentRegion
With .Offset(.Rows.Count, 0).Resize(1, 1)
.Value = Now
.Offset(0, 1).Value = Over.Value
End With
End With
End If
Application.EnableEvents = True
Next
End Sub
 




If you're running this using VBA in Excel, please post in Forum707.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top