Using PROCH and PROCV at the same time to find value

Auctor Somnium

New Member
Joined
Sep 15, 2022
Messages
6
Office Version
  1. 365
Platform
  1. Windows
So I have two spreadsheets:

MAIN:
1666903947909.png


PRODUCTION:
1666903963517.png



A bit of my situation:
This spreadsheets are examples in the actual one I can't change their structure so a solution has to be through a formula.

I have to do a two condition search, the problem is one is using PROCH and the other is using PROCV (At least this are the only methods I know on how to do this other than PROCX, that I think won't be useful in this situation).


Issue:
I need the production value to appear in column A of the "MAIN" sheet

The first condition is the month of production, I need to search the "PRODUCTION" sheet and come back with a value according to the month
The second condition is the code, I need to search it there as well and come back with a value according to it

The problem is I have to search an specific column or an specific line index and those are dependant in eachother
1666904471703.png

In this PROCV for example the PROCH would be the one that would actually define which column it's searching the value in, instead of it searching in this example column 2.The problem is that, doing that doesn't work since the PROCH would also have a line index which would have to be defined by the PROCV it's defining.

Is there any way to do this even with a different formula or manner? Or maybe even with this same formulas but in a way I don't know about

Sorry if it's slightly confusing I can try explaining it better if necessary
 

Attachments

  • 1666903805615.png
    1666903805615.png
    54.4 KB · Views: 3
  • 1666903993700.png
    1666903993700.png
    6.9 KB · Views: 2

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hi there,

I guess you're using the portuguese version of Excel.


Please, try this formula, in A2:

Excel Formula:
=ÍNDICE(PRODUCTION!$B$2:$E$10;CORRESP(MAIN!C2;PRODUCTION!$A$2:$A$10;0);CORRESP(MAIN!B2;PRODUCTION!$B$1:$E$1;0))

Which I expect to bethe correct translation of the formula:
Excel Formula:
=INDEX(PRODUCTION!$B$2:$E$10;MATCH(MAIN!C2;PRODUCTION!$A$2:$A$10;0);MATCH(MAIN!B2;PRODUCTION!$B$1:$E$1;0))
 
Upvote 0
Solution
Hi there,

I guess you're using the portuguese version of Excel.


Please, try this formula, in A2:

Excel Formula:
=ÍNDICE(PRODUCTION!$B$2:$E$10;CORRESP(MAIN!C2;PRODUCTION!$A$2:$A$10;0);CORRESP(MAIN!B2;PRODUCTION!$B$1:$E$1;0))

Which I expect to bethe correct translation of the formula:
Excel Formula:
=INDEX(PRODUCTION!$B$2:$E$10;MATCH(MAIN!C2;PRODUCTION!$A$2:$A$10;0);MATCH(MAIN!B2;PRODUCTION!$B$1:$E$1;0))
Thank you it's exactly what I needed
 
Upvote 0

Forum statistics

Threads
1,215,034
Messages
6,122,782
Members
449,095
Latest member
m_smith_solihull

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