Forum Discussion

Keep Calm's avatar
Keep Calm
Copper Contributor
Mar 08, 2018

If function for text field

I have a column in which the cells contain image dimensions e.g. 5320 x 3500. I want to create a formula which is if 'number 1' is bigger than 'number 2' the result is 'Landscape', else the result is 'Portrait'. I understand basic if functions, but his is beyond me!

  • Jamil's avatar
    Jamil
    Mar 08, 2018

    use this  =IF((LEFT(B5,4)+0)>(RIGHT(B5,4)+0),"Landscape","Portrait") formula in C5 of the example file.

     

    i have also attached the file.

     

     

  • Jamil's avatar
    Jamil
    Bronze Contributor
    lets say you cell number 1 is in A2 and number 2 is in B2

    so here you can build your formula like this and put it in whatever cell you want, e,g C2

    =IF(A2>B2, "Landscape","Portrait")
    • Keep Calm's avatar
      Keep Calm
      Copper Contributor

      Thanks for your response. I understand how that function works and I only wish it was that simple, my cell contains '5300 x 3200'

       

       

      • Jamil's avatar
        Jamil
        Bronze Contributor
        can you please show as example what value exactly you are comparing with what value?

Resources