VBA to Return Row and Column cell info based on number range.

Ztcollins

Board Regular
Joined
Jun 4, 2014
Messages
69
Office Version
  1. 365
Platform
  1. Windows
Row 1 has spring data from 500-10000 @ intervals of 25 IE 500, 525, 550, 575, etc starting at F1
Column E has Shock data that goes from 100-10000 @ intervals of 100 (IE 100, 200, 300, 400) Starting @ E2.

C5 is a cell were a number value is entered.

I want to make a executable search via once that number is entered to search the range of F2:NV101 and have it return the values of each Row 1 and Column E combination that is a match +/- 10 from the value in cell c5.

I want the results of the ROW to enter into Column A starting at A9 and the results of Column E to enter into Column B starting at B9with the cell value in C9. (IE if the number was exactly 420 then the results would show N6=700 in A9, 600 in B9, 420 in C9

Effectively this will give me every spring and shock combination that will match the number entered plus or minus 10 each way.
Refer to image below. Also the array has formulas.

Any and all help is appreciated and I am extremely thank full for it all.

1629624707808.png
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Something like this maybe?
Book1
ABC
5Target420
6
7
8RowColumnCell
9500675413.75
10600500419
11500700420
12600525425.25
13500725426.25
14   
Sheet1
Cell Formulas
RangeFormula
A9:A14A9=IF(C9="","",AGGREGATE(15,6,$E$2:$E$39/($F$2:$S$39=C9),COUNTIF(C$9:C9,C9)))
B9:B14B9=IF(C9="","",LOOKUP(C9,INDEX($F$2:$S$39,MATCH(A9,$E$2:$E$39),0),$F$1:$S$1))
C9:C14C9=IF(ROWS(C$9:C9)>COUNTIFS($F$2:$S$39,">="&$C$5-10,$F$2:$S$39,"<="&$C$5+10),"",AGGREGATE(15,6,$F$2:$S$39/($F$2:$S$39>=$C$5-10),ROWS(C$9:C9)))
 
Upvote 0
Solution

Forum statistics

Threads
1,214,985
Messages
6,122,606
Members
449,089
Latest member
Motoracer88

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