We help IT Professionals succeed at work.

Excel, run a report based on data?

AlexAmbler
AlexAmbler asked
on
Hi,
I have an excel file called Order data (file uploaded) which I use each week for a stock take, I use the values in column H for the amount I need to order each week, is it possible at the click of a button to take the data from column A, B, H & I to a new file or worksheet similar to the file ‘report’ (also uploaded) to make this process quicker?

Thank you for the guidance.
Alex.
 Order-data.xls report.xlsx
Comment
Watch Question

Try this macro

Sub orderreport()
Dim sr As Boolean, i As Long, rng As Range
ActiveSheet.Copy
ActiveSheet.UsedRange.Cells.Value = ActiveSheet.UsedRange.Cells.Value
Range("J1:S1").EntireColumn.Delete
Range("C1:G1").EntireColumn.Delete
sr = Range("A3:A" & Rows.Count).Replace("SELECT", "")
Range("A3:A" & Rows.Count).SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Set rng = Range("A3").CurrentRegion
sr = rng.Sort([a1], xlAscending)
For i = rng.Row + rng.Rows.Count To 3 Step -1
If Cells(i + 1, 1) <> Cells(i, 1) Then Cells(i + 1, 1).EntireRow.Insert
Next i
End Sub

Author

Commented:
Thank you for the guidance, now going to try to modify to further save time.

Regards,
Alex