Potential Macro Question

hellokirsten

New Member
Joined
Jan 11, 2018
Messages
17
Hi all! Very happy to find this resource
I will try to be as thorough/concise as I can be

- I have a CSV file that we download for a number of customers. I have created a macro to remove all of the unnecessary information from that CSV file
- Now, there is a field of audit notes that I am trying to divide into these different sections: Idle (notes that contain "idle"), Hardware (notes that contain "battery, heartbeat, transition, and transport"), and Install (notes that contain "initial" or "engine")
- For those three different sections, I am wanting to build something that will take that full file, and divide it into three different sheets

I've tried to record a macro - but the line items range from 20 - 700, so the recording of the macro did not work very well.
Any help would be greatly appreciated!
 
Code:
Sub Macro7()
Macro7 Macro
Keyboard Shortcut: Option+Cmd+t
    Selection.AutoFilter
    ActiveSheet.Range("$F$1:$F$272").AutoFilter Field:=1, Criteria1:="*idle*"
End Sub
 
Upvote 0

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Try changing that line to
Code:
         .Range("A1:K" & UsdRws).AutoFilter Field:=11, Criteria1:=CritAry(Cnt)
 
Upvote 0
Changed that line, ran into the same issue of the sheets being blank
Ran the step through again, same error on that same line after I changed it
 
Upvote 0
Unfortunately I can't understand why that is happening, unless there is something different between Mac & PC when using Autofilter
 
Upvote 0
Completely forgot I also have a windows work laptop as well - I'm getting the same error on windows excel if that makes any difference
 
Upvote 0
Ok this is the test data that I'm working with. Is this the same layout & positioning that you have?


Excel 2013 32 bit
ABCDEFGHIJ
1EW Asset NameEquipment TypeESNDevice MINFWLast TransmittedDevice ModelCurrently CoupledFirst CoupledAudit Notes
2166801Smooth RollerC5S00210-Dec 15 2017 05:54AMAEMPJun 01 2014 12:00AMJun 01 2014 12:00AMLast transmission was AEMP on 12/15/2017, is the device still installed?
3169200ScraperDBW00130-Dec 15 2017 11:43AMAEMPJun 01 2014 12:00AMJun 01 2014 12:00AMLast transmission was AEMP on 12/15/2017, is the device still installed?
4169201ScraperDBW00131-Dec 15 2017 11:44AMAEMPJun 01 2014 12:00AMJun 01 2014 12:00AMLast transmission was AEMP on 12/15/2017, is the device still installed?
5141508Wheel Loader4642007212A100003690ABCB2.82Jan 10 2018 01:57PMGS-280May 12 2015 12:00AMMay 12 2015 12:00AMLast transmission was Transition to Sleep on 01/10/2018, is the device still installed? Equipment has been idle 71.43% during 01/04/2018 - 01/11/2018
618200Transport Detach Trailer3143037674A10000438633CE7.4Dec 28 2017 04:10PMGS-720tOct 20 2015 12:00AMOct 20 2015 12:00AMLast transmission was Initial Power Up on 12/28/2017, is the device still installed?
719227Enclosed Cargo Trailer3143038420A10000438640DE-Jan 10 2018 05:50PMGS-720tOct 28 2015 12:00AMOct 28 2015 12:00AMLast transmission was Heartbeat Sleep on 01/10/2018, is the device still installed?
819221Enclosed Cargo Trailer3143046224A10000438492197.4Sep 12 2017 12:00PMGS-720tDec 03 2015 12:00AMDec 03 2015 12:00AMLast transmission was Initial Power Up on 09/12/2017, is the device still installed?
9101002Truck Crane4642015384A100004386D7922.83Jan 10 2018 04:26PMGS-280Jun 17 2016 12:00AMOct 07 2015 12:00AMLast transmission was Transition to Sleep on 01/10/2018, is the device still installed?
1010265All Terrain Crane4642018313A100004386C6582.83Nov 15 2017 10:20AMGS-280Dec 31 2015 12:00AMDec 31 2015 12:00AMLast transmission was Transition to Sleep on 11/15/2017, is the device still installed?
Ranking


Also do you have any merged cells, blank rows?
 
Upvote 0
delete column c, d, e, h, and i
there is one column that is proprietary info (so I have a total of 6 columns - A-F)
i am so sorry - I forgot that I removed all of those
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top