VBA to return multiple values based on cases

pablo_max3045

New Member
Joined
May 15, 2017
Messages
33
Hello all,
I have a rather hard (for me) excel task I need to solve, but I am not sure where to start.
I have two sheets in my workbook. One showing different frequency bands with can be set to Yes/No supported and a 2nd sheet showing 3 different cases.

Based on which value is there, I need to filter the list and return the band into the low/mid/high colums
SupportedBandDuplex ModeUp lowestUp highest
Yes7FDD25002570
Yes8FDD880915
Yes11FDD1427.91447.9
Yes12FDD699716
Yes13FDD777787
Yes18FDD815830
Yes19FDD830845
Yes20FDD832862
Yes71FDD663617

For example, for case 1 I need to filter supported to true. Then filter "up lowest" to find the lowest value below 1000 and then return the value from band in the "LOW" column. 71 for example.
For High column, I need to do the same thing, except filter for the highest value below 1000 this time from "Up Highest" and return again the value from band. 8 for example.
I need to do that down the list for each low / mid / high for every test number.
I know this is something which VBA is made for, but ive not a clue how to do it.

Test number 1CASELowMidHigh
Test number 21
71​
8
Test number 31
Test number 42
Test number 52
 
Last edited:

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
My assumptions is that I need to run a loop for Low, if there is something in column A for the test number. Maybe with a find last row or something. Then have 3 separate paths for the cases. Then do the special filtering for each case and return the result to column C.
Then make a new loop for columns D and E (mid / high)
 
Upvote 0

Forum statistics

Threads
1,215,442
Messages
6,124,886
Members
449,194
Latest member
ronnyf85

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