A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

vlookup???



 
 
Thread Tools Display Modes
  #1  
Old April 21st, 2009, 11:07 PM posted to microsoft.public.excel.worksheet.functions
Scott D[_2_]
external usenet poster
 
Posts: 10
Default vlookup???

I've studied a lot of post and can't find what i need so here goes. Forgive
me if i missed it somewhere.

sheet 1 contains the following data:

A B C D E
1 Date Invoice# Job Name Class Amount
2 4/5/09 546321 South Rough 23.16
3 4/6/09 546322 South Trim 57.42
4 4/7/09 546323 South Rough 89.30
5 4/7/09 546324 North Rough 1.23

I want sheet 2 to look like the following:

A B C D E
1 Rough
2 South
3 Date Invoice# Job Name Class Amount
4 4/5/09 546321 South Rough 23.16
5 4/7/09 546323 South Rough 89.30


because I told it to search sheet1!A2:E5and find whatever criteria that I
input into Sheet2 A1 and A2.
Then return the row in sheet1 that met both criteria from a1 and a2 to the
next available row on sheet 2 (ignoring the header rows)
I hope this makes sense...it does in my head :-)


  #3  
Old April 22nd, 2009, 03:38 AM posted to microsoft.public.excel.worksheet.functions
Herbert Seidenberg
external usenet poster
 
Posts: 1,113
Default vlookup???

Excel 2007
Advanced Filter
Macro
http://www.mediafire.com/file/yjdznynjywj/04_21_09.xlsm
  #4  
Old April 22nd, 2009, 07:15 PM posted to microsoft.public.excel.worksheet.functions
Scott D[_2_]
external usenet poster
 
Posts: 10
Default vlookup???

This code will do what I want but due to my lack of knowledge and experience
in VB, I'm having a tough time customizing it to my worksheet layout.
Instead of my criteria being located in a table (table3), I would like the
criteria to be located in individual cells anywhere I choose and I don't
know how to change the syntax to reflect this. I would also like the code
to fire or execute whenever any action occurs in the workbook or at least
when a new criteria is selected from the dropdown list in these designated
cells. (which I do like...the dropdown lists) as opposed to the button. I
would also like to have more than one sheet with filtered results to allow
for easier viewing and printing but the source sheet would remain the same.
Hope this doesn't confuse and thankyou so much for your time. one last
request, could you include a few more notes in your code so i can understand
what each line is doing. some of it is logical and easy to deduce, but a
lot of it is greek to me. I really would like to understand vb better. any
learning sources?
"Herbert Seidenberg" wrote in message
...
Excel 2007
Advanced Filter
Macro
http://www.mediafire.com/file/yjdznynjywj/04_21_09.xlsm



  #5  
Old April 22nd, 2009, 08:24 PM posted to microsoft.public.excel.worksheet.functions
Don Guillett
external usenet poster
 
Posts: 6,167
Default vlookup???

Simply. To use the existing macro right click sheet tabview codeinsert
this.
Now when you change EITHER c4 or c5 the macro will be called.

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("c4:d5")) Is Nothing Then
Call AdvFilter
End If

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Scott D" wrote in message
...
This code will do what I want but due to my lack of knowledge and
experience in VB, I'm having a tough time customizing it to my worksheet
layout. Instead of my criteria being located in a table (table3), I would
like the criteria to be located in individual cells anywhere I choose and
I don't know how to change the syntax to reflect this. I would also like
the code to fire or execute whenever any action occurs in the workbook or
at least when a new criteria is selected from the dropdown list in these
designated cells. (which I do like...the dropdown lists) as opposed to the
button. I would also like to have more than one sheet with filtered
results to allow for easier viewing and printing but the source sheet
would remain the same. Hope this doesn't confuse and thankyou so much for
your time. one last request, could you include a few more notes in your
code so i can understand what each line is doing. some of it is logical
and easy to deduce, but a lot of it is greek to me. I really would like
to understand vb better. any learning sources?
"Herbert Seidenberg" wrote in message
...
Excel 2007
Advanced Filter
Macro
http://www.mediafire.com/file/yjdznynjywj/04_21_09.xlsm



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:42 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.