How to extract information

eagle028

New Member
Joined
May 28, 2005
Messages
49
Hi, with the following data

Number Name Sales Remarks
11233 Becky 50000 SG11233 Sales
55665 Ting 19000 Non sales record
4567 Mei 10000 SG4567 Sales
18004 Mark 75000 Non sales record
55991 Ting 20000 SG55991 Sales
60606 Sam 25000 Non sales record

Is it possible to create a formula / marco to extract the rows with the Remarks SGXXXX Sales such that the final result is something like:

Number Name Sales Remarks
11233 Becky 50000 SG11233 Sales
4567 Mei 10000 SG4567 Sales
55991 Ting 20000 SG55991 Sales

Will having the word "Sales" in Remarks help with the extraction?
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
try this code

Sub Macro1()
'
' Macro1 Macro
'

'
Range("A1:B1").Select
ActiveCell.Range("A1:E2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.AutoFilter
ActiveSheet.Range("$A$1:$E$7").AutoFilter Field:=4, Criteria1:=Array( _
"SG11233", "SG4567", "SG55991"), Operator:=xlFilterValues
Selection.Copy
Sheets.Add After:=Sheets(Sheets.Count)
ActiveSheet.Paste
End Sub
 
Upvote 0
Hi,

Sorry, I think my e.g. was not very clear:

-------A---------B-----C----------D
1----Number---Name----Sales----Remarks
2----11233----Becky----50000----SG11233 Sales
3----55665----Ting-----19000-----Non sales record
4----4567-----Mei------10000-----SG4567 Sales
5----18004----Mark-----75000----Non sales record
6----55991----Ting-----20000-----SG55991 Sales
7----60606----Sam-----25000-----Non sales record
 
Upvote 0
Hi,

Sorry, I think my e.g. was not very clear:

-------A---------B-----C----------D
1----Number---Name----Sales----Remarks
2----11233----Becky----50000----SG11233 Sales
3----55665----Ting-----19000-----Non sales record
4----4567-----Mei------10000-----SG4567 Sales
5----18004----Mark-----75000----Non sales record
6----55991----Ting-----20000-----SG55991 Sales
7----60606----Sam-----25000-----Non sales record


Use autofilter and then copy the records
 
Upvote 0

Forum statistics

Threads
1,224,518
Messages
6,179,258
Members
452,901
Latest member
LisaGo

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