Find first value greater than a certain number in Excel

1

Hello, good evening

I would like friends here to help me with this questioning. I have an Excel spreadsheet for calculating steel armatures for concrete structures. By way of calculation, we find value of area of steel per m². From this value, I want to find in a list of predetermined values the one that answers me, that is, it is the first value greater than or equal to that found. I can find the value with the SE function, only it gets huge and with several conditionals, given the large amount of values. So, if anyone knows in a more simplified way, thank you. Below are images for better understanding:

Q: Remember that as I choose steel gauge, I want a function that looks in a specific column. As I chose 10mm, the value found should be in Column S

    
asked by anonymous 15.08.2018 / 01:13

3 answers

1

SOLUTION FOUND: INDEX + CORRESP

Many thanks to the friends who tried to solve my problem, but I managed to unwind after a lot of my head, since I had tried to solve this same problem in other worksheets and in more complicated tables with this one, with several entries. The secret of the solution lies in the use of the CORRESP function, because with it, I can find the line in which the smallest area of steel is bigger than the calculated one, simply by using the CORRESPONDENCE TYPE -1 (IS LARGER THAN) , in the last argument of the formula. That way I use this value in the INDEX function, in which I have all my data as an array, the line the value given by CORRESP and the column the value given by the cell linked to the Form Control , in which the gauge is selected by the user, plus 1 unit

DETERMINATION OF THE EFFECTIVE STEEL AREA:

=SEERRO(ÍNDICE($N$5:$T$34;CORRESP(I21;SE(U12=1;$O$5:$O$34;SE(U12=2;$P$5:$P$34;SE(U12=3;$Q$5:$Q$34;SE(U12=4;$R$5:$R$34;SE(U12=5;$S$5:$S$34;SE(U12=6;$T$5:$T$34))))));-1);U12+1);"Selecione uma bitola de aço maior")

In the CORRESP function of this formula, the user chooses a gauge, which corresponds to a linked cell number of the Form Control (Combination Box - Not Controlling ACTIVEX ). Thus, the 4.2mm gauge corresponds to the index 1, 5mm index 2 and so on. This will set the column where CORRESP will search. In the general function INDEX , the last argument of the function that requests the column, where it contains the data I want, is added by a unit, since the gauge chosen by the user corresponds, in the table, to its index plus 1, that is, 4.2mm is index 1, but in table it is column 2, 5mm is index 2, but in table it is column 3 and so on (COLUMN = index + 1) . The SEERRO function was used in case the largest area of steel in the selected gauge is lower than the calculated one, asking the user to choose a larger gauge. The CORRESP function returns me, for the values highlighted below, the lines 9 and 13 of the table, respectively.

Ofcourse,thisTableAuxiliarywillnotbeviewedbytheuseraswellasthegaugeselectionindex.IputittobetterunderstandwhatIdid.IchosetheINDEXfunctioninsteadofPROCVbecauseitallowsmetosearchdatatotheleftandthusautomaticallydeterminethebarspacing(Column1),whichisanotherinterestsme.Soweusedthesamefunctionabove,withonlythelastargumentoftheformula,whichisnowColumn1(Spacing).

SPACEDETERMINATION:

=SEERRO(ÍNDICE($N$5:$T$34;CORRESP(I21;SE(U12=1;$O$5:$O$34;SE(U12=2;$P$5:$P$34;SE(U12=3;$Q$5:$Q$34;SE(U12=4;$R$5:$R$34;SE(U12=5;$S$5:$S$34;SE(U12=6;$T$5:$T$34))))));-1);1);"─")

* NOTE: The formulas are great because I have chosen to put the CORRESP formula inside the INDEX formula. But I could have done as I did initially by calculating the CORRESP in another cell and entering the INDEX function with its numeric value only.

    
18.08.2018 / 02:38
1

The solution works, I do not know if it's the one with the best Golf Code possible. There is room to decrease this formula.

But with the data as in the following image:

Givenagaugeandminimumvalue

IncellM6thecolumnwiththegaugedata(from1to6inline4)andincellM7thevalueofthecalculation(inexample6,1)isinserted.

Withthe=MÍNIMO(SE(INDIRETO(ENDEREÇO(4;14+CORRESP(M6;O4:T4;0))&":"&ENDEREÇO(18;14+CORRESP(M6;O4:T4;0)))>=M7;INDIRETO(ENDEREÇO(4;14+CORRESP(M6;O4:T4;0))&":"&ENDEREÇO(18;14+CORRESP(M6;O4:T4;0))))) formula entered with Ctrl + Shift + Enter

The result is to find in the column with the value of gauge 4, the smallest value greater than 6.1. That is 6.5.

Given a calculation, find the gauge

=INDIRETO(ENDEREÇO(4;MÍNIMO(SE(O5:T18>=M7;COL(O:T))))) inserted with Ctrl + Shift + Enter

Findonlyincolumn

TofindincolumnSthecalculationvalueincellM7

=MÍNIMO(SE(S:S>=M7;S:S))insertedwithCtrl+Shift+Enter

    
16.08.2018 / 13:53
1

I think this formula meets your need.

I've created an auxiliary calculation cell so that the search is done correctly.

Auxiliary Formula

=SE(+INT(X2)-X2<-0,5;ARRED.PARA.CIMA(X2;0);X2)

Search Formula

=+PROCV(Y2;N:T;CORRESP(W2;N$2:T$2;0);3)

Note: I did some testing and got the correct values, in case there is an error says to fix.

    
16.08.2018 / 11:46