Vlookup with multiple results

robertsgw

New Member
Joined
Aug 30, 2011
Messages
31
Office Version
  1. 365
I'm trying to write of formula to that will allow me lookup a customer property and tell me their invoices outstanding from another excel tab. I have been using a vlookup, but it only comes up with the first occurrence. Below is an example. So on another tab I would enter ABC ST and the formula would pull all the invoices for ABC ST. Thanks.

COLUMN A COLUMN B COLUMN C
customer pro invoice # Amount
ABC ST 1234 5000
ABC ST 5678 60000
CBDG 91878 7000
PEFGR 87890 8000
GJERS 7856 9000
 
One other question for you. How do you copy a macro from one workbook to a new workbook. I tried right clicking on tab of old workbook and did a move/copy to new workbook. Doesn't seem to be working.
If it's just a "few" lines of code I'll just open the module and highlight the code then copy and paste into a module in the other file.

Another way...

Right click the code module>Export File
Save it in an easy to reach location

Open the other file
Open the VBE
Right click the file name>Import file
Select the module name
 
Upvote 0

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Thanks for the help. On to another project and ran into some problems. I don't know if this is even possible. On one sheet I want to have a number is 12345689 which will be say an invoice number. This first sheet is just a summary sheet of invoices numbers. If possible I want to click on the invoice number on the summary sheet and that will automatically open another sheet which will be the detailed invoice. Kind of like a hyper link. Is this possible?
 
Upvote 0
Thanks for the help. On to another project and ran into some problems. I don't know if this is even possible. On one sheet I want to have a number is 12345689 which will be say an invoice number. This first sheet is just a summary sheet of invoices numbers. If possible I want to click on the invoice number on the summary sheet and that will automatically open another sheet which will be the detailed invoice. Kind of like a hyper link. Is this possible?
Is the invoice number also the name of the sheet that you want to be taken to?
 
Upvote 0
yes, it is.
Ok, you can do something like this...

Book1
AB
1InvoiceGoto
2123123
3456456
Sheet1

Column A is the invoice number and column B is a hyperlink to that invoice sheet.

This formula entered in cell B2 and copied down as needed:

=HYPERLINK("#'"&A2&"'!A1",A2)

When clicked that will take you to cell A1 of the invoice sheet.
 
Upvote 0

Forum statistics

Threads
1,224,505
Messages
6,179,153
Members
452,891
Latest member
JUSTOUTOFMYREACH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top