Loop Query

Mayur Prabhu

New Member
Joined
Jun 26, 2024
Messages
2
Office Version
  1. 2016
Platform
  1. Windows
Please help me to automate my sheet.
Problem Statement attached.
 

Attachments

  • EXCEL PROBLEM_page-0001.jpg
    EXCEL PROBLEM_page-0001.jpg
    192.4 KB · Views: 20

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.
Since there are no names of your sheets, adjust the ranges according to your data (C9:C11, A9:A11, B9:B11 represent your table 2 data):

Excel Formula:
=IFERROR(INDEX($C$9:$C$11,MATCH(1,($A$9:$A$11=$A2)*($B$9:$B$11=B$1),0)),"")
 
Upvote 0
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at:

There is no need to repeat the link(s) provided above but if you have posted the question at other places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
Welcome to the Forum.
If you are using Excel 2016, I suspect the above will require you to enter it as an array formula.
Here is a non-array option.

20240627 2D Lookup Mayur Prabhu.xlsx
ABCDEF
11223344556
2Job 1Tom - 0    
3Job 2  Sam - 1  
4Job 3    Ron - 1
5Job 4     
6Job 5     
Sheet1
Cell Formulas
RangeFormula
B2:F6B2=IFERROR(LOOKUP(2,1/((Sheet2!$A$1:$A$3=$A2)*(Sheet2!$B$1:$B$3=B$1)),Sheet2!$C$1:$C$3),"")


Sheet2 data used:
20240627 2D Lookup Mayur Prabhu.xlsx
ABC
1Job 112Tom - 0
2Job 234Sam - 1
3Job 356Ron - 1
Sheet2
 
Upvote 0
Welcome to the Forum.
If you are using Excel 2016, I suspect the above will require you to enter it as an array formula.
Here is a non-array option.

20240627 2D Lookup Mayur Prabhu.xlsx
ABCDEF
11223344556
2Job 1Tom - 0    
3Job 2  Sam - 1  
4Job 3    Ron - 1
5Job 4     
6Job 5     
Sheet1
Cell Formulas
RangeFormula
B2:F6B2=IFERROR(LOOKUP(2,1/((Sheet2!$A$1:$A$3=$A2)*(Sheet2!$B$1:$B$3=B$1)),Sheet2!$C$1:$C$3),"")


Sheet2 data used:
20240627 2D Lookup Mayur Prabhu.xlsx
ABC
1Job 112Tom - 0
2Job 234Sam - 1
3Job 356Ron - 1
Sheet2
Thank You so much.....This was very helpful.....It worked...Finally i can sleep peacefully..
 
Upvote 0

Forum statistics

Threads
1,221,577
Messages
6,160,609
Members
451,657
Latest member
Ang24

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