send to dguillett1 @gmail.com


Don Guillett
Microsoft MVP Excel
SalesAid Software
dguille...@gmail.com
-----Original Message----- From: LearnExcel
Sent: Wednesday, March 07, 2012 4:37 PM
To: MS EXCEL AND VBA MACROS
Subject: Re: $$Excel-Macros$$ copy range

hey Don sorry to trouble you but for some reason i couldnt get this to
work...

i dont know how to attatch a file



On Mar 6, 8:57 am, "dguillett1" <dguille...@gmail.com> wrote:
Try this. BTW you have NO "Bob" in field 7

Sub filterandcopyusedrange()
Dim ds As Worksheet
Set ds = Sheets("Sheet10")
Cells.Find("*", Cells(Rows.Count, Columns.Count) _
, , , xlByRows, xlPrevious).Copy ds.Range("d1")
With ActiveSheet.UsedRange
  .AutoFilter Field:=7, Criteria1:="bob"
  .SpecialCells(xlCellTypeVisible).Copy ds.Range("a2")
  .AutoFilter
End With
End Sub

Don Guillett
Microsoft MVP Excel
SalesAid Software
dguille...@gmail.com







-----Original Message-----
From: LearnExcel
Sent: Monday, March 05, 2012 6:21 PM
To: MS EXCEL AND VBA MACROS
Subject: $$Excel-Macros$$ copy range

Hi Guys/Girls i use VBA to copy a range using the following code

Selection.AutoFilter Field:=7, Criteria1:="bob"
ActiveSheet.Range("a1:o1", ActiveSheet.Range("a1").End(xlDown)).Select

the problem that i have is in cell "G" after the last cell there is a
3 lines of blank cell and then the report,

once the filter is made i want the cell to also include the"Name
report"

can anyone help?

data name nam nam nam nam nam nam nam
3/5/2012 random john bob dog bob john new name nam
3/6/2012 random john bob dog bob john new name nam
3/6/2012 random john bob dog bob john new name nam
3/6/2012 bob dog bob john random random john bob
3/6/2012 john bob dog bob john random john bob
3/6/2012 random john bob dog bob john new name nam
3/6/2012 bob bob dog bob john random john bob
3/6/2012 random john bob bob random random john bob
3/6/2012 random john bob dog bob john new name nam

Name report

--
FORUM RULES (986+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please
Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will
not get quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security
measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in
signatures are prohibited.

NOTE  : Don't ever post personal or confidential data in a workbook. Forum
owners and members are not responsible for any loss.

--------------------------------------------------------------------------- ---------------------------
To post to this group, send email to excel-macros@googlegroups.com

--
FORUM RULES (986+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited.

NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss.

------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com
--
FORUM RULES (986+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited.
NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com

Reply via email to