?
Solved

Need Help With VBA Query

Posted on 2014-12-12
5
Medium Priority
?
69 Views
Last Modified: 2015-01-13
I have a file where I'm trying to find all records that are associated with each other.  The criteria is as follows:
If there is a cost in column K, look at column B & C.  All preceding rows with the same value in colums B&C should be copied to Sheet 2.

Sample file attached.  Can some one help me please?
Exchange-VBA-FIle.xlsx
0
Comment
Question by:ArisaAnsar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 

Author Comment

by:ArisaAnsar
ID: 40497619
Please can some one help?
0
 
LVL 53

Accepted Solution

by:
Rgonzo1971 earned 1000 total points
ID: 40497682
Hi,

You could use this formula to filter out the lines with zero result(array formula so enter with Ctrl-Shift-Enter)

=MAX(($B$2:$B$75=B2)*($C$2:$C$75=C2)*$K$2:$K$75)

Regards
Exchange-VBA-FIleV1.xlsx
0
 
LVL 33

Assisted Solution

by:Rob Henson
Rob Henson earned 1000 total points
ID: 40500086
Assuming already sorted by columns B & C, a non-array formula in column L to show those with values, starting in L2 and copied down:

=IF(AND(B2=B1,C2=C1),L1,K2)

You can then use Auto Filter to filter in place. When you copy a filtered list only those records which are visible will be copied so can then be pasted into another list.

Alternatively, you can use Advanced Filter, this gives the option to copy to another location and can just copy certain columns if so required.

Thanks
Rob H
0
 
LVL 49

Expert Comment

by:Martin Liss
ID: 40546219
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question