Solved

Need Help With VBA Query

Posted on 2014-12-12
5
63 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
5 Comments
 

Author Comment

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

Accepted Solution

by:
Rgonzo1971 earned 250 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 250 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 47

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

685 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