Solution to return a single value from a multiple condition if formula

akuk

New Member
Joined
Oct 13, 2022
Messages
4
Platform
  1. Windows
Hi,

Could anyone please suggest a solution to return a single value from a multiple condition IF formula OR any other way (macro) for below problem?

I have to select a single criteria in my main working file out of many criteria (Z1, Z2, so on) designed in a separate sheet (refer below table) to select and accordingly multiple column (A,B,C) with different % fill in to the main file.

eg. If i select Z1 in main file, I get return value in A column as 5%, B column as 10% and so on.
If I select Z2 in main file, I get return value of A column a 8%, B column as 16% and so on.

CriteriaABC
Z15.00%10.00%20.00%
Z28.00%16.00%24.00%

Please advise.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Welcome to the Board!

Are you using Excel 365 (you should update your profile to show which version of Excel you are using).
If so, you may be able to use the new FILTER function.
See: FILTER function

If not, you may be able use a series of VLOOKUP, XLOOKUP, or INDEX/MATCH functions:
See: MS Excel: How to use the VLOOKUP Function (WS)
 
Upvote 0
Welcome to the Board!

Are you using Excel 365 (you should update your profile to show which version of Excel you are using).
If so, you may be able to use the new FILTER function.
See: FILTER function

If not, you may be able use a series of VLOOKUP, XLOOKUP, or INDEX/MATCH functions:
See: MS Excel: How to use the VLOOKUP Function (WS)
Thank you.
I am using excel 365

I am just beginner so appreciate if you/anyone else can write a formula of VBA for below problem:
Criteria in sheet1 and Result are required in sheet2.
eg. If I select/write Z2 in sheet2 then it automatically populate the result in A, B, C column of that row in sheet2.

Criteria (Sheet1)ABC
Z15.00%10.00%20.00%
Z28.00%16.00%24.00%
Z310.00%18.00%26.00%
Result (Sheet 2)ABC
Z28.00%16.00%24.00%


Thank you in advance.
 
Upvote 0
No VBA needed.

If this is what you have on Sheet1:

1666612351610.png


and you enter "Z2" in cell A2 on Sheet2, you can get the other three columns populated by entering this formula in cell B2:
Excel Formula:
=FILTER(Sheet1!B2:D4,Sheet1!A2:A4=Sheet2!A2)

So the result looks like this:
1666612425856.png
 
Upvote 0
Solution
You are welcome.
Glad I was able to help!
 
Upvote 0

Forum statistics

Threads
1,214,522
Messages
6,120,019
Members
448,938
Latest member
Aaliya13

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