Please Help With A Simple VBA Macro

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • omni77
    New Member
    • Oct 2006
    • 1

    Please Help With A Simple VBA Macro

    I am such a beginner that I can only do the 'record' macros, but I have promised to help someone and I find that I'm not able. Would you please write a macro for me since I have run out of time and have not been able to do it, even though I have really been trying? It is Excel 2003.

    There are 5 columns, A-B-C and D always have data, E seldom has data. When column E does have data, the entire row needs to move to sheet 2 and the blank row left behind needs to be deleted. It would be good if the row would move on entering after typing in data. Also, there are already 100's of rows in this report, and if the macro could move all of those, that would be great.

    Thank you so much!
  • albertw
    Contributor
    • Oct 2006
    • 267

    #2
    Originally posted by omni77
    I am such a beginner that I can only do the 'record' macros, but I have promised to help someone and I find that I'm not able. Would you please write a macro for me since I have run out of time and have not been able to do it, even though I have really been trying? It is Excel 2003.

    There are 5 columns, A-B-C and D always have data, E seldom has data. When column E does have data, the entire row needs to move to sheet 2 and the blank row left behind needs to be deleted. It would be good if the row would move on entering after typing in data. Also, there are already 100's of rows in this report, and if the macro could move all of those, that would be great.

    Thank you so much!
    automated macro on keystrokes in not possible, but try this one on closing

    Private Sub auto_close()
    On Error Resume Next
    Application.Scr eenUpdating = False
    If Not Sheets(1).Range ("e1").Value = vbNullString Then
    i = 0
    While Not Sheets(2).Range ("a1").Offset(0 , i).Value = vbNullString
    i = i + 1
    Wend
    Sheets(2).Range ("a1").Offset(0 , i).Value = Sheets(1).Range ("e1").Value
    Sheets(1).Range ("e1").ClearCon tents
    End If
    ActiveWorkbook. Save
    Application.Scr eenUpdating = True
    Application.Qui t
    End Sub

    Comment

    Working...