Home > Software engineering >  Consult ace - VBA function for help
Consult ace - VBA function for help

Time:10-21


Work table is sheet1, I need the data in the sheet "W - data - ordered" in a row, I need to meet the requirements for the first time a function to find (q * L ^ 2/8 & gt; The serial number of the 0.6 x Fy) in the line, data is the serial number (far left) as follows:

W (kg/m) Surf (m2) Sx (cm3) Sy (cm3) Sect (cm2) D (mm) (mm) W
1 W6x9 13.4 0.695 91.1 18.2 16.8 149.2 101.6
2 W8x10 14.9 0.797 127.9 17.4 19.2 200.0 101.6
3 W10x12 17.9 0.899 178.6 18.0 21.6 250.8 101.6
4 W6x12 17.9 0.699 120.1 24.5 22.6 152.4 101.6
5 W8x13 19.3 0.800 162.4 22.4 25.8 203.2 101.6
6 W4x13 19.3 0.603 89.5 31.1 26.0 104.8 101.6
7 W12x14 20.8 1.000 244.2 19.5 27.3 301.6 101.6
8 W10x15 22.3 0.902 226.0 23.7 29.0 254.0 101.6
9 W8x15 22.3 0.806 194.0 27.8 29.2 206.4 101.6
10 W6x15 22.3 0.902 159.2 51.0 29.0 152.4 152.4
.
My function is as follows: could you tell me how to modify cycle, and address references right? (function I + 4 is a serial number I corresponding data of line number, five is the data I need column number)
The Function Frame1 (Fy, q, L)
I=1
Do the While (q * L ^ 2/8)/INDIRECT (Address (I + 4,5,4, "W - data - ordered")) & lt;=0.6 * Fy
The Frame1=I
I=I + 1
Loop
End Function

CodePudding user response:

Fy, q, L have to do with the data?
Q * L ^ 2/8 & gt; 0.6 * Fy and (q * L ^ 2/8)/INDIRECT (Address (I + 4,5,4, "W - data - ordered")) & lt;=0.6 * Fy
?????
  •  Tags:  
  • VBA
  • Related