Forum Discussion

fkp7057's avatar
fkp7057
Copper Contributor
Jul 27, 2022
Solved

Formula to populate higher value between 2 cell.

Hello All,   I am trying to populate higher no. value from selected cell, which has some alphanumerical data. as per below table.   Value A Value B Result I want 3.5Ax25 3.5Cx120 3.5Cx...
  • HansVogelaar's avatar
    HansVogelaar
    Jul 27, 2022

    fkp7057 

    You should always provide relevant examples. Your first post didn't mention this option at all!

     

    =IF(--MID(A2,FIND("x",A2)+1,IFERROR(FIND(" ",A2),LEN(A2))-FIND("x",A2))>--MID(B2,FIND("x",B2)+1,IFERROR(FIND(" ",B2),LEN(B2))-FIND("x",B2)),A2,B2)

     

    If you have Microsoft 365 or Office 2021:

    =LET(
        xPosA, FIND("x",A2),
        sPosA, IFERROR(FIND(" ",A2),LEN(A2)),
        numA, --MID(A2,xPosA+1,sPosA-xPosA),
        xPosB, FIND("x",B2),
        sPosB, IFERROR(FIND(" ",B2),LEN(B2)),
        numB, --MID(B2,xPosB+1,sPosB-xPosB),
        IF(numA>numB,A2,B2)
    )

Resources