+ Reply to Thread
Results 1 to 3 of 3

Excel formula involving comparisons of numbers

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    02-18-2013
    Location
    Berlin, Germany
    MS-Off Ver
    Excel 2016
    Posts
    221

    Excel formula involving comparisons of numbers

    Hello!

    My problem looks as follows:

    In columns D and E I'm having numbers. Let's call the numbers in column D with "x" and the numbers in column E with "y". I want to do the following operation in every row: if x>=3 and y>3, then I want to have "1" written in column F. If x>=3 and y<3, I want "2" in F. If x<3 and y>=3, then I want "3" in the column F. At last, if x<3 and y<3, I want "4" in F.

    For Instance:

    D E F

    3 2 2
    3 5 1
    1 5 3


    How do I have to input the formula, to achieve the desired result?

    Thank you very much for your time!

  2. #2
    Valued Forum Contributor
    Join Date
    04-13-2011
    Location
    Ottawa, Canada
    MS-Off Ver
    365
    Posts
    1,101

    Re: Excel formula involving comparisons of numbers

    Assuming your first row is 1. Thus put this on F1.

    =IF(AND(D1>=3, E1>3), 1, IF(AND(D1>=3, E1<3), 2, IF(AND(D1<3, E1>=3), 3, IF(AND(D1<3, E1<3), 4, "Incomplete Formula"))))

  3. #3
    Forum Contributor
    Join Date
    02-18-2013
    Location
    Berlin, Germany
    MS-Off Ver
    Excel 2016
    Posts
    221

    Re: Excel formula involving comparisons of numbers

    Thank you very much!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1