Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Autofill datasheet using filter


bump, anyone?


--
Thrain
------------------------------------------------------------------------
Thrain's Profile: http://www.excelforum.com/member.php...o&userid=29192
View this thread: http://www.excelforum.com/showthread...hreadid=490344

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Autofill datasheet using filter


Ok...Here's something to try:

Assumptions:
On Sheet1 contains your data in cells A1:H10
On Sheet2 is where you want the extracted data to be displayed

So....
Using Sheet2:
A1: f$nXwX
B1: adj
C1: NIT
D1: HAND
E1: BOARD
F1: P
G1: PRWIN
H1: PRTIE

InsertNameDefine
Names in workbook: Sheet2!rngDest
Refers to: =Sheet2!$A$1:$H$1

I1: f$nXwX
I2: f$n4w4

InsertNameDefine
Names in workbook: Sheet2!rngCriteria
Refers to: =Sheet2!$J$1:$J$2

Now for the tricky part...still on Sheet2:
InsertNameDefine
Names in workbook: Sheet1!rngSource
Refers to: =Sheet1!$A$1:$H$10

(Notice: you are on Sheet2, but creating a Sheet2 level range name, but
the referenced range is on Sheet1)

The reason: An advanced filter cannot SEND data to another sheet, but
it can PULL data from another sheet.

Next: In a general vba module, enter this code:

Option Explicit
Sub PullMatchingData()
Range("Sheet2!rngSource").AdvancedFilter _
Action:=xlFilterCopy, _
CriteriaRange:=Range("Sheet2!rngCriteria"), _
CopyToRange:=Range("Sheet2!rngDest"), _
Unique:=False
End Sub

To run the code:
ToolsMacroMacros (or [Alt]+[F8])
Select and run: PullMatchingData

Change the value of I2 to f$n4w2 and run it again.

Does that help?
Ron


--
Ron Coderre
------------------------------------------------------------------------
Ron Coderre's Profile: http://www.excelforum.com/member.php...o&userid=21419
View this thread: http://www.excelforum.com/showthread...hreadid=490344

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Autofill datasheet using filter


References to I1 and I2 should be replaced with J1 and J2

Ron


--
Ron Coderre
------------------------------------------------------------------------
Ron Coderre's Profile: http://www.excelforum.com/member.php...o&userid=21419
View this thread: http://www.excelforum.com/showthread...hreadid=490344

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Autofill datasheet using filter


Names in workbook: Sheet1!rngSource

SHOULD BE:
Names in workbook: Sheet2!rngSource

(Changed Sheet1 to Sheet2)

I've got to do more copy/paste and less type-type-type. (sheesh)

Ron


--
Ron Coderre
------------------------------------------------------------------------
Ron Coderre's Profile: http://www.excelforum.com/member.php...o&userid=21419
View this thread: http://www.excelforum.com/showthread...hreadid=490344

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Datasheet with drop down Trev[_2_] Excel Discussion (Misc queries) 0 October 28th 09 11:54 PM
filter and autofill series number Silpa Excel Discussion (Misc queries) 1 August 4th 09 03:42 PM
Autofill: Need to autofill one week block, (5) weekday only into cells. dstock Excel Discussion (Misc queries) 1 June 17th 05 08:21 PM
Q. Autofill question: Can I autofill alpha characters like I can numbers? George[_22_] Excel Programming 5 August 7th 04 10:33 AM
PowerPoint datasheet KD[_3_] Excel Programming 0 June 22nd 04 11:54 AM


All times are GMT +1. The time now is 06:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"