aide sur une fonction excel

%3CLINGO-SUB%20id%3D%22lingo-sub-1848504%22%20slang%3D%22fr-FR%22%3Ehelps%20out%20on%20an%20excel%20function%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1848504%22%20slang%3D%22fr-FR%22%3E%3CP%3Ehello%2C%20I%20explain%20my%20problem%3A%3C%2FP%3E%3CP%3Ein%20a%20first%20Excel%20table%2C%20I%20have%20a%20price%20list%20followed%20by%20an%20ex%20name%3A%2098%20FV%2C%20100%20FA...%20the%20letters%20are%20included%20by%20a%20custom%20format%20of%20the%20%22number%22%20tab%20(e.g.%20'%230.00'%20FV))%3C%2FP%3E%3CP%3Ein%20a%20second%20table%2C%20I%20try%20to%20extract%20the%20greatest%20value%20from%20my%20list%2C%20but%20also%20by%20including%20the%20letters%20that%20follow%20my%20numbers.%26nbsp%3B%3C%2FP%3E%3CP%3Eon%20the%20given%20example%2C%20my%20greatest%20value%20to%20display%20would%20be%3A%20100%20FA%20or%20all%20the%20formulas%20I%20find%20display%20me%20the%20numerical%20value%20but%20not%20the%20associated%20letters.%3C%2FP%3E%3CP%3Ecould%20someone%20tell%20me%20how%20to%20find%20the%20greatest%20value%20of%20a%20list%20and%20keep%20the%20associated%20letters%3F%26nbsp%3B%3C%2FP%3E%3CP%3EPS%3A%20if%20some%20things%20do%20not%20seem%20clear%20in%20my%20explanations%20do%20not%20hesitate%20to%20ask%20me%20more%20details!%3C%2FP%3E%3CP%3Ethanks%20in%20advance%20for%20your%20answers%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1848504%22%20slang%3D%22fr-FR%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1848615%22%20slang%3D%22de-DE%22%3ESubject%3A%20aide%20sur%20une%20fonction%20excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1848615%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F855767%22%20target%3D%22_blank%22%3E%40ag231590%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EEnglish%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22postbody%22%3E%3CSPAN%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3E%7B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%E2%80%A2%3DMAX(IF(ISNUMBER(SEARCH(%22yourLetters1%22%2CA1%3AA999%2C1))%2CMID(A1%3AA999%2CSEARCH(%22-%22%2CA1%3AA999%2C1)%2B1%2C99)*1%2C%22%22))%3CSPAN%20class%3D%22postbody%22%3E%3CSPAN%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3E%7D%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22postbody%22%3E%3CSPAN%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3EDo%20not%20enter%20the%20%2C%20but%20exit%20the%20formula%20with%20CTRL%20%2B%20SHIFT%20%2B%20ENTER%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22postbody%22%3E%3CSPAN%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3EFrench%3A%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22postbody%22%3E%3CSPAN%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3E%3DMAX(SI(ESTNUM(CHERCHE(%22%3CSPAN%20class%3D%22%22%3Evoslettres%3C%2FSPAN%3E1%22%3B%20A1%3AA999%3B1))%3B%20STXT(A1%3AA999%3B%20CHERCHE(%22-%22%3B%20A1%3AA999%3B1)%2B1%3B99)*1%3B%22))%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3EN'entrez%20pas%20le%2C%20mais%20quittez%20la%20formule%20avec%20CTRL%20%2B%20SHIFT%20%2B%20ENTR%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22postbody%22%3E%3CSPAN%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3Eor%20with%20VBA%20Code%20-%20%3CSPAN%20class%3D%22%22%3Eou%20avec%20code%20VBA%3C%2FSPAN%3E%20%3A%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3E'French%20VBA%20Code%0A%0ASub%20test()%0ADim%20c%20As%20Range%0ADim%20xgro%C3%9F%20As%20Long%0ADim%20ygro%C3%9F%20As%20Long%0A%0AFor%20Each%20c%20In%20Range(%22A1%3AA%22%20%26amp%3B%20Cells(Rows.Count%2C%201).End(xlUp).Row)%0A%20%20%20%20If%20Left(c.Value%2C%203)%20%3D%20%22XXX%22%20Then%0A%20%20%20%20%20%20%20%20If%20Right(c%2C%20Len(c)%20-%203)%20%26gt%3B%20xgro%C3%9F%20Then%20xgro%C3%9F%20%3D%20Right(c%2C%20Len(c)%20-%203)%0A%20%20%20%20Else%0A%20%20%20%20%20%20%20%20If%20Right(c%2C%20Len(c)%20-%203)%20%26gt%3B%20ygro%C3%9F%20Then%20ygro%C3%9F%20%3D%20Right(c%2C%20Len(c)%20-%203)%0A%20%20%20%20End%20If%0ANext%0A%0AMsgBox%20%22Plus%20grande%20valeur%20XXX%20%3A%20%22%20%26amp%3B%20xgro%C3%9F%0AMsgBox%20%22Plus%20grande%20valeur%20YYY%20%3A%20%22%20%26amp%3B%20ygro%C3%9F%0A%0AEnd%20Sub%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22tlid-translation%20translation%22%3E%3CSPAN%20class%3D%22%22%3EIf%20everything%20has%20not%20been%20tested%2C%20please%20try%20it%20out%20and%20adjust%20it%20where%20necessary.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20I%20was%20able%20to%20help%20you.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENikolino%3C%2FP%3E%3CP%3EI%20know%20I%20don't%20know%20anything%20(Socrates)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E*%20Kindly%20Mark%20and%20Vote%20this%20reply%20if%20it%20helps%20please%2C%20as%20it%20will%20be%20beneficial%20to%20more%20community%20members%20reading%20here%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Visitor

bonjour, je vous explique ma problématique :

dans un premier tableau Excel, j'ai une liste de prix suivi d'une dénomination ex: 98£FV, 100£FA... les lettres sont incluses par un format personnalisé de l'onglet "nombre"(ex : # ##0,00 €" FV")

dans un deuxième tableau, je cherche à extraire la plus grande valeur de ma liste, mais en incluant également les lettres qui suivent mes nombres. 

sur l'exemple donné, ma valeur la plus grande à afficher serait : 100£FA or toutes les formules que je trouve m'affiche la valeur numérique mais pas les lettres associées.

est-ce que quelqu'un pourrait me dire comment faire pour trouver la plus grande valeur d'une liste et en conservant les lettres associées? 

PS: si certaines choses ne paraissent pas claires dans mes explications n'hésitez pas à me demander plus de précisions !

merci par avance pour vos réponses

2 Replies
Highlighted

@ag231590 

 

English:

{=MAX(IF(ISNUMBER(SEARCH("yourLetters1",A1:A999,1)),MID(A1:A999,SEARCH("-",A1:A999,1)+1,99)*1,""))}

Do not enter the {}, but exit the formula with CTRL + SHIFT + ENTER

 

French:

=MAX(SI(ESTNUM(CHERCHE("voslettres1";A1:A999;1));STXT(A1:A999;CHERCHE("-";A1:A999;1)+1;99)*1;""))

N'entrez pas le {}, mais quittez la formule avec CTRL + SHIFT + ENTRÉE

 

or with VBA Code - ou avec code VBA :

 

'French VBA Code

Sub test()
Dim c As Range
Dim xgroß As Long
Dim ygroß As Long

For Each c In Range("A1:A" & Cells(Rows.Count, 1).End(xlUp).Row)
    If Left(c.Value, 3) = "XXX" Then
        If Right(c, Len(c) - 3) > xgroß Then xgroß = Right(c, Len(c) - 3)
    Else
        If Right(c, Len(c) - 3) > ygroß Then ygroß = Right(c, Len(c) - 3)
    End If
Next

MsgBox "Plus grande valeur XXX : " & xgroß
MsgBox "Plus grande valeur YYY : " & ygroß

End Sub

 

 

If everything has not been tested, please try it out and adjust it where necessary.

 

Hope I was able to help you.

 

Nikolino

I know I don't know anything (Socrates)

 

* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here

Highlighted

@ag231590 The letters you "add" are just changing the way the numbers are displayed. One time 100 becomes 100.00 FV and another time 100.00 FA. But for Excel it still 100.

 

On what basis do you determine the FV or FA part of your format? In other words, why FV in one cell and why FA in another? Perhaps you can apply the same logic to the greatest number found.