So this is going to be a challenge, I am looking for a button/Vb script that exports raw data in the below formats on a separate sheet (Detail Export).
Change date/time format to "dd_mm_yyyy".
Remove Duplicate values, See below for details.
Keep Duplicates if:
<style type="text/css">table.tableizer-table{ font-size: 12px; border: 1px solid #CCC ; font-family: Arial, Helvetica,sans-serif; } .tableizer-table td{ padding:4px; margin:3px; border: 1px solid #CCC ;} .tableizer-table th{ background-color: #104E8B ; color:#FFF; font-weight: bold; }</style>[TABLE="class: tableizer-table"]
<tbody>[TR="class: tableizer-firstrow"]
[TH]Type
[/TH]
[TH]ID
[/TH]
[TH]Version
[/TH]
[TH]Date/Time
[/TH]
[TH]Field
[/TH]
[TH]User
[/TH]
[/TR]
[TR]
[TD]Word Doument
[/TD]
[TD]1
[/TD]
[TD]231
[/TD]
[TD]01-06-2018 09:53:28BST
[/TD]
[TD]Removed Text
[/TD]
[TD]Jane
[/TD]
[/TR]
[TR]
[TD]Word Doument
[/TD]
[TD]1
[/TD]
[TD]231
[/TD]
[TD]01-06-2018 09:53:28 BST
[/TD]
[TD]Added Word
[/TD]
[TD]Jane
[/TD]
[/TR]
[TR]
[TD]Word Doument
[/TD]
[TD]1
[/TD]
[TD]231
[/TD]
[TD]01-06-201809:53:28 BST
[/TD]
[TD]Modified Date
[/TD]
[TD]Jane
[/TD]
[/TR]
[TR]
[TD]Word Doument
[/TD]
[TD]1
[/TD]
[TD]232
[/TD]
[TD]01-06-2018 09:53:28 BST
[/TD]
[TD]Removed Text
[/TD]
[TD]Steve
[/TD]
[/TR]
[TR]
[TD]Word Doument
[/TD]
[TD]1
[/TD]
[TD]232
[/TD]
[TD]01-06-201809:53:28 BST
[/TD]
[TD]Added Word
[/TD]
[TD]Steve
[/TD]
[/TR]
[TR]
[TD]Word Doument
[/TD]
[TD]1
[/TD]
[TD]232
[/TD]
[TD]01-06-2018 09:53:28 BST
[/TD]
[TD]Modified Date
[/TD]
[TD]Steve
[/TD]
[/TR]
[TR]
[TD]Excel Sheet
[/TD]
[TD]1
[/TD]
[TD]231
[/TD]
[TD]01-06-2018 09:53:28 BST
[/TD]
[TD]Removed Text
[/TD]
[TD]Jane
[/TD]
[/TR]
[TR]
[TD]Excel Sheet
[/TD]
[TD]1
[/TD]
[TD]231
[/TD]
[TD]01-06-2018 09:53:28 BST
[/TD]
[TD]Added Word
[/TD]
[TD]Jane
[/TD]
[/TR]
[TR]
[TD]Excel Sheet
[/TD]
[TD]1
[/TD]
[TD]231
[/TD]
[TD]01-06-2018 09:53:28 BST
[/TD]
[TD]Modified Date
[/TD]
[TD]Jane
[/TD]
[/TR]
[TR]
[TD]Excel Sheet
[/TD]
[TD]1
[/TD]
[TD]232
[/TD]
[TD]01-06-2018 09:53:28 BST
[/TD]
[TD]Removed Text
[/TD]
[TD]Steve
[/TD]
[/TR]
[TR]
[TD]Excel Sheet
[/TD]
[TD]1
[/TD]
[TD]232
[/TD]
[TD]01-06-2018 09:53:28 BST
[/TD]
[TD]Added Word
[/TD]
[TD]Steve
[/TD]
[/TR]
[TR]
[TD]Excel Sheet
[/TD]
[TD]1
[/TD]
[TD]232
[/TD]
[TD]01-06-2018 09:53:28 BST
[/TD]
[TD]Modified Date
[/TD]
[TD]Steve
[/TD]
[/TR]
</tbody>[/TABLE]
Different User, Same ID, Different Version and Same day. So essentially above each user should have "one change" to their name instead of 3 each for that day for that 1 ID. But also have a "second change" for the different "Type" (Excel Sheet).
I am looking for the data exported to leave behind Type and Unique ID's against Version Number and Day.
Please let me know if you need any clarification.
I have VB script that works for Daily data, but this is required for Monthly Data spread which removed duplicates for the different days as it picks up the same ID against the User. In the "RawData" sheet, "Column A" is a Concatenate of "Column C and G" (ID and Name).
See Script
Change date/time format to "dd_mm_yyyy".
Remove Duplicate values, See below for details.
Keep Duplicates if:
<style type="text/css">table.tableizer-table{ font-size: 12px; border: 1px solid #CCC ; font-family: Arial, Helvetica,sans-serif; } .tableizer-table td{ padding:4px; margin:3px; border: 1px solid #CCC ;} .tableizer-table th{ background-color: #104E8B ; color:#FFF; font-weight: bold; }</style>[TABLE="class: tableizer-table"]
<tbody>[TR="class: tableizer-firstrow"]
[TH]Type
[/TH]
[TH]ID
[/TH]
[TH]Version
[/TH]
[TH]Date/Time
[/TH]
[TH]Field
[/TH]
[TH]User
[/TH]
[/TR]
[TR]
[TD]Word Doument
[/TD]
[TD]1
[/TD]
[TD]231
[/TD]
[TD]01-06-2018 09:53:28BST
[/TD]
[TD]Removed Text
[/TD]
[TD]Jane
[/TD]
[/TR]
[TR]
[TD]Word Doument
[/TD]
[TD]1
[/TD]
[TD]231
[/TD]
[TD]01-06-2018 09:53:28 BST
[/TD]
[TD]Added Word
[/TD]
[TD]Jane
[/TD]
[/TR]
[TR]
[TD]Word Doument
[/TD]
[TD]1
[/TD]
[TD]231
[/TD]
[TD]01-06-201809:53:28 BST
[/TD]
[TD]Modified Date
[/TD]
[TD]Jane
[/TD]
[/TR]
[TR]
[TD]Word Doument
[/TD]
[TD]1
[/TD]
[TD]232
[/TD]
[TD]01-06-2018 09:53:28 BST
[/TD]
[TD]Removed Text
[/TD]
[TD]Steve
[/TD]
[/TR]
[TR]
[TD]Word Doument
[/TD]
[TD]1
[/TD]
[TD]232
[/TD]
[TD]01-06-201809:53:28 BST
[/TD]
[TD]Added Word
[/TD]
[TD]Steve
[/TD]
[/TR]
[TR]
[TD]Word Doument
[/TD]
[TD]1
[/TD]
[TD]232
[/TD]
[TD]01-06-2018 09:53:28 BST
[/TD]
[TD]Modified Date
[/TD]
[TD]Steve
[/TD]
[/TR]
[TR]
[TD]Excel Sheet
[/TD]
[TD]1
[/TD]
[TD]231
[/TD]
[TD]01-06-2018 09:53:28 BST
[/TD]
[TD]Removed Text
[/TD]
[TD]Jane
[/TD]
[/TR]
[TR]
[TD]Excel Sheet
[/TD]
[TD]1
[/TD]
[TD]231
[/TD]
[TD]01-06-2018 09:53:28 BST
[/TD]
[TD]Added Word
[/TD]
[TD]Jane
[/TD]
[/TR]
[TR]
[TD]Excel Sheet
[/TD]
[TD]1
[/TD]
[TD]231
[/TD]
[TD]01-06-2018 09:53:28 BST
[/TD]
[TD]Modified Date
[/TD]
[TD]Jane
[/TD]
[/TR]
[TR]
[TD]Excel Sheet
[/TD]
[TD]1
[/TD]
[TD]232
[/TD]
[TD]01-06-2018 09:53:28 BST
[/TD]
[TD]Removed Text
[/TD]
[TD]Steve
[/TD]
[/TR]
[TR]
[TD]Excel Sheet
[/TD]
[TD]1
[/TD]
[TD]232
[/TD]
[TD]01-06-2018 09:53:28 BST
[/TD]
[TD]Added Word
[/TD]
[TD]Steve
[/TD]
[/TR]
[TR]
[TD]Excel Sheet
[/TD]
[TD]1
[/TD]
[TD]232
[/TD]
[TD]01-06-2018 09:53:28 BST
[/TD]
[TD]Modified Date
[/TD]
[TD]Steve
[/TD]
[/TR]
</tbody>[/TABLE]
Different User, Same ID, Different Version and Same day. So essentially above each user should have "one change" to their name instead of 3 each for that day for that 1 ID. But also have a "second change" for the different "Type" (Excel Sheet).
I am looking for the data exported to leave behind Type and Unique ID's against Version Number and Day.
Please let me know if you need any clarification.
I have VB script that works for Daily data, but this is required for Monthly Data spread which removed duplicates for the different days as it picks up the same ID against the User. In the "RawData" sheet, "Column A" is a Concatenate of "Column C and G" (ID and Name).
See Script
Code:
Sub Run()
'
' Run Macro
'
Range("A2:G999999").Select
Range("A2").Activate
Application.CutCopyMode = False
Selection.Copy
Sheets("DetailExport").Select
Range("A2").Select
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveSheet.Range("$A$1:$G$999999").RemoveDuplicatesColumns:=Array(3, 7), _
Header:=xlYes
Columns("F:F").Select
Selection.InsertShift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.InsertShift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
Columns("E:E").Select
Selection.TextToColumns Destination:=Range("E1"),DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, 1), Array(10, 1), Array(19, 1)), TrailingMinusNumbers_
:=True
Columns("F:G").Select
Range("G1").Activate
Selection.DeleteShift:=xlToLeft
Dim LR AsLong
LR =Range("E" & Rows.Count).End(xlUp).Row
Range("E2").FormulaR1C1 ="=LEFT(VLOOKUP(RC[-4],'RawData'!C[-4]:C,5,false),10)"
Range("E2").AutoFill Destination:=Range("E2:E" &LR)
Sheets("Summary").Select
ActiveWorkbook.RefreshAll
Range("A1").Select
End Sub
Last edited by a moderator: