Can anyone assist in how I can combine the following 2 macros
I need to do the delete first
they are as follows
andHTML Code:
What I want is to click one button not 2HTML Code:
Assistance appreciated
Can anyone assist in how I can combine the following 2 macros
I need to do the delete first
they are as follows
andHTML Code:
What I want is to click one button not 2HTML Code:
Assistance appreciated
Sub Button2_Click()
Dim sh As Worksheet, ws As Worksheet, Fr As Range, c As Range
Dim Rws As Long, Rng As Range
Set sh = Worksheets("DataTable")
Set ws = Worksheets("SalesPerson")
Set Fr = ws.Range("C4")
With sh
Rws = .Cells(Rows.Count, "L").End(xlUp).Row
Set Rng = .Range(.Cells(5, "L"), .Cells(Rws, "L"))
For Each c In Rng.Cells
If c = Fr Then
ws.Cells(Rows.Count, "C").End(xlUp).Offset(1, 0) = c.Offset(0, -9)
End If
Next c
End With
ActiveSheet.Range("C6:C300").Select
Selection.ClearContents
End Sub
or put it at the beginning. my bad
Try this:
Please Login or Register to view this content.
It needs to clear the cells c4 downwards first then apply the 2nd macro
what I have at the moment is the clearing last
Appreciate your assistance
Thanks I was able to create a combine Macro which did the trick
Thanks for the help
regards
B
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks