Xlookup multiple lookups

ecrodrig

Board Regular
Joined
Jan 21, 2022
Messages
99
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I have a file that I want to do the following on xlookup C2 in T&MMthlyFile tab column B but I want it to only look at the row that has Total in it I am attaching a picture. So basically find Project1 but only give me row 2 since that is the row that has project 1 and TOTAL on it. Just need the first part of the formula as I nee dto add other information to it but need to know how to pull just that particular row.

Thanks in advance.
 

Attachments

  • Screen Shot 2022-08-06 at 2.43.18 PM.png
    Screen Shot 2022-08-06 at 2.43.18 PM.png
    79.8 KB · Views: 13

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
How about using Filter
Excel Formula:
=FILTER(Sheet1!R2:R100,(Sheet1!A2:A100="Total")*(Sheet1!B2:B100=C2))
 
Upvote 0
So that formula does work but the problem is that since I have multiple rows between Total it is giving me a Calc error. Any way to add something that skips non-Total rows? If you look at my image you will see that row A2 says Total but the next Total isn't until A5 which means when I drag the formula I get Calc error and even without dragging it I get Calc error.
 
Upvote 0
How about
Excel Formula:
=FILTER(Sheet1!R2:R100,(Sheet1!A2:A100="Total")*(Sheet1!B2:B100=C2),"")
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0
Sorry I did find one more issue. My "real" file where I need the output has 131 lines and the file where I am pulling the info only has 100 lines. When I pull down the formula I am good up to line 25 but after that, I get no more results. Any suggestions?
 
Upvote 0
Without being able to see both sheets, there's not much I can do.
 
Upvote 0

Forum statistics

Threads
1,217,413
Messages
6,136,474
Members
450,015
Latest member
excel_beta_345User

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