Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi guys, I wonder if someone may help me to improve this code, basically read
the worksheet "Personal Budget" until it find the word Final, the are some empty lines that is why I ask if the cell is not empty, if is not empty I copy the information sequentially to the worksheet where I am running the Command Button, this code works but I was wondering if there is a way to improved, maybe there is a way to do it without the do while cycle. Thanks Private Sub CommandButton1_Click() Dim Row As Integer, row2 As Integer, Count As Integer Row = 1 row2 = 5 Do While Worksheets("Personal Budget").Cells(row2, 2) < "Final" If Worksheets("Personal Budget").Cells(row2, 2) < "" Then Cells(Row, 1) = Worksheets("Personal Budget").Cells(row2, 2).Value Row = Row + 1 End If row2 = row2 + 1 Loop End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Improving formula | Excel Worksheet Functions | |||
Improving use of Worksheets | Excel Worksheet Functions | |||
advice on improving code | Excel Programming | |||
Trying to improving existing code (portion of) | Excel Programming | |||
Improving code.....For Next | Excel Programming |