Sub splitout()
Dim strPath, strOutDetails, strMsg As String
On Error GoTo handle
strOutDetails = Workbooks("Master").Path & "\DisplayCopy.xls"
Workbooks("Master").Sheets("Master").UsedRange.Copy
Workbooks.Add
ActiveCell.PasteSpecial
ActiveSheet.UsedRange.AutoFilter
If Dir(strOutDetails) <> "" Then Kill (strOutDetails)
ActiveWorkbook.SaveAs (strOutDetails)
stopping:
Exit Sub
handle:
strMsg = "An unexpected situation arose in your program." & vbCrLf & _
"Unable to continue due to Error " & Err.Number & vbCrLf & Err.Description
MsgBox strMsg, vbCritical, "Oh bother."
Resume stopping
End Sub
>You are not logged in, either login or create an account to post comments
Places to start:
SUMIFS(sum_range; critera_range1, critera1; [etc])
- with the critera of "CA" (probably specified somewhere on the second sheet)
if the sumrange is Column B, and the criteria range is Column A of the same length, and the criteria is "CA" or a cell with the text "CA" then you'll have a sum of all values with "CA"
VLOOKUPS
(Careful with these, data needs to be sorted or things go whacky, tables with 70K records tend to be brute forced meaning things get painful) - keep in mind that you can't be looking up something that occurs twice unless you do some funky stuff with key creation...
PivotTables and GETPIVOTDATA also are great friends
posted by Nanukthedog at 12:25 PM on July 9