Excel Macro help
Closed
DDTEmp
Posts
1
Registration date
Thursday March 26, 2009
Status
Member
Last seen
March 27, 2009
-
Mar 27, 2009 at 11:56 AM
WutUp WutUp - Apr 1, 2009 at 07:43 PM
WutUp WutUp - Apr 1, 2009 at 07:43 PM
Related:
- Excel Macro help
- Spell number in excel without macro - Guide
- Excel marksheet - Guide
- Excel apk for pc - Download - Spreadsheets
- Macros in excel download free - Download - Spreadsheets
- Kernel for excel - Download - Backup and recovery
2 responses
buster23
Posts
15
Registration date
Monday December 29, 2008
Status
Member
Last seen
June 3, 2009
2
Mar 28, 2009 at 03:28 AM
Mar 28, 2009 at 03:28 AM
hi,
try this link to get tutorials about using excel macros:
https://www.helpwithpcs.com/software/microsoft-excel-macro-tutorial.php
this will help you.
try this link to get tutorials about using excel macros:
https://www.helpwithpcs.com/software/microsoft-excel-macro-tutorial.php
this will help you.
This assumes that there is a heading in the first row, and your data you want to filter for unique records is in
column A. This uses the advanced filter to extract the unique records to column J. Then, it will copy and paste
values to column K and delete the "extract" from column J so the countif formula can be used. You said a
chart will need to be made from this information that is why the table will be created to the right of the data
within the same spreadsheet. Once the table is set-up, you can create a chart from there. You can change the
ranges (or columns) to suit your spreadsheet.
Hope this helps!
Sub CreateList()
Dim List
List = 2
Range("A2:A2000").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range("J2"), Unique:=True
Columns("J").Select
Selection.Copy
Range("K1").Select
Selection.PasteSpecial Paste:=xlPasteValues
Columns("J").ClearContents
Application.CutCopyMode = False
Do Until Range("K" & List) = ""
Range("L" & List) = "=countif(A2:A2000,K" & List & ")"
List = List + 1
Loop
Range("M2").Select
End Sub
column A. This uses the advanced filter to extract the unique records to column J. Then, it will copy and paste
values to column K and delete the "extract" from column J so the countif formula can be used. You said a
chart will need to be made from this information that is why the table will be created to the right of the data
within the same spreadsheet. Once the table is set-up, you can create a chart from there. You can change the
ranges (or columns) to suit your spreadsheet.
Hope this helps!
Sub CreateList()
Dim List
List = 2
Range("A2:A2000").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range("J2"), Unique:=True
Columns("J").Select
Selection.Copy
Range("K1").Select
Selection.PasteSpecial Paste:=xlPasteValues
Columns("J").ClearContents
Application.CutCopyMode = False
Do Until Range("K" & List) = ""
Range("L" & List) = "=countif(A2:A2000,K" & List & ")"
List = List + 1
Loop
Range("M2").Select
End Sub