Forum Discussion

Eklavya's avatar
Eklavya
Copper Contributor
Dec 13, 2019
Solved

Compare 3 Numbers. Third number needs to be compared to previous two numbers and show result.

Need to compare numbers of column A (attached excel sheet) and want column B to reflect word: U, D or S based on following rules

Rules:

  1. If A4 is more +ve than previous two numbers then U
  2. If A4 is more -ve than previous two numbers then D
  3. If A4 is more +ve than one of the numbers but more -ve than the other should show as S.

 

A4 cell is just taken as example as that's where this comparison starts. Cell A number needs to be compared with previous two cell A numbers to determine U, D or S.

 

Without MACROs and/or VBA

  • Eklavya 

     

    Well, I had to Google what "+ve" and "-ve" meant---did you think that such abbreviations are part of common parlance?! They're not.--in order to come up with the attached. See if it works as you want.

     

    And for all those who also don't know what those abbreviations mean:

    • +ve means "positive"
    • -ve means "negative"

    Clear once you know, but obscure until you know.

2 Replies

  • mathetes's avatar
    mathetes
    Gold Contributor

    Eklavya 

     

    Well, I had to Google what "+ve" and "-ve" meant---did you think that such abbreviations are part of common parlance?! They're not.--in order to come up with the attached. See if it works as you want.

     

    And for all those who also don't know what those abbreviations mean:

    • +ve means "positive"
    • -ve means "negative"

    Clear once you know, but obscure until you know.

    • Eklavya's avatar
      Eklavya
      Copper Contributor

      mathetesThank you. This is exactly what was needed. Point +vely noted 😉

Resources