Hello again,
I am looking for a V.BA Macros to auto Filter data in column A and past in worksheet("datasheet") by column.
copy of the sample sheathes attached for your refference
Hello again,
I am looking for a V.BA Macros to auto Filter data in column A and past in worksheet("datasheet") by column.
copy of the sample sheathes attached for your refference
As a beginner starter paste this demonstration to the Dashboard worksheet module :
PHP Code:
Sub Demo1()
Dim C%, Rg As Range, H%, Rk As Range, R&
C = 1
Me.UsedRange.Clear
Application.ScreenUpdating = False
With Sheets("ST")
.[A1].AutoFilter
Set Rg = .[A1].CurrentRegion
H = Rg.Columns.Count + 1
Set Rk = .Cells(H + 2)
End With
Rg.Columns(1).AdvancedFilter xlFilterCopy, , Rk, True
For R = 2 To Rk.CurrentRegion.Rows.Count - 1
Rg.AdvancedFilter xlFilterCopy, Rk.Resize(2), Cells(C)
Rk(R + 1).Copy Rk(2)
C = C + H
Next
Rk.CurrentRegion.Clear
Set Rg = Nothing: Set Rk = Nothing
Application.ScreenUpdating = True
End Sub
Do you like it ? So thanks to click on bottom left star icon « ★ Add Reputation » !
Thanks marcl,
1 last requirement. Can v copy only first 10 rows if the data is more than 10 rows.
Thanks for ur help
Please Login or Register to view this content.
Good Luck
I don't presume to know what I am doing, however, just like you, I too started somewhere...
One-day, One-problem at a time!!!
If you feel I have helped, please click on the star to left of post [Add Reputation]
Also....add a comment if you like!!!!
And remember...Mark Thread as Solved.
Excel Forum Rocks!!!
Thanks both of u it us working as i expected.
Topic marked as closed and reputation added to both of u.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Thanks.gif
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks