+ Reply to Thread
Results 1 to 7 of 7

IF question

  1. #1
    Forum Contributor
    Join Date
    10-28-2003
    Location
    Happyville, USA
    MS-Off Ver
    365
    Posts
    294

    IF question

    Hi,

    I have a sheet that has many columns. If certain columns have None in a cell I want the sheet to show me an x in a another column. I can get the formula to work for one column at a time but not multiple. Example: Cells N2, P2, and M2 may contain None. How do I write the formula to read those cells and return and an x in a different column if None is populated in the cells in question.

    Thanks in advance.

    Eddie.

  2. #2
    Forum Contributor
    Join Date
    02-28-2006
    Posts
    690
    =if(or(a1="",b1="",c1=""),"none","")

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,065
    Depends if they all need to be populated or just one, so youll need either

    =IF(AND(N2="None",P2="None",M2="None"),"x","")

    or

    =IF(OR(N2="None",P2="None",M2="None"),"x","")
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Forum Contributor
    Join Date
    10-28-2003
    Location
    Happyville, USA
    MS-Off Ver
    365
    Posts
    294
    Awesome. Thanks guys. I was pretty close with my formula but left out one of the ",". Again I thank you for your quick reply.

    Eddie.

  5. #5
    Toppers
    Guest

    RE: IF question

    try

    =IF(SUMPRODUCT(--(M2:P2="None")),"x","")

    If any cells in the range have "None" then "x" will be placed in cell.

    Is this what you require?

    "punter" wrote:

    >
    > Hi,
    >
    > I have a sheet that has many columns. If certain columns have None in
    > a cell I want the sheet to show me an x in a another column. I can get
    > the formula to work for one column at a time but not multiple. Example:
    > Cells N2, P2, and M2 may contain None. How do I write the formula to
    > read those cells and return and an x in a different column if None is
    > populated in the cells in question.
    >
    > Thanks in advance.
    >
    > Eddie.
    >
    >
    > --
    > punter
    >
    >
    > ------------------------------------------------------------------------
    > punter's Profile: http://www.excelforum.com/member.php...fo&userid=2044
    > View this thread: http://www.excelforum.com/showthread...hreadid=563258
    >
    >


  6. #6
    Forum Contributor
    Join Date
    10-28-2003
    Location
    Happyville, USA
    MS-Off Ver
    365
    Posts
    294
    Hey that works even better. One question about the formula: What is the meaning of the (-- between the Sumproduct( and the (M2? The formula works great but I'm wondering what exatctly the (-- does so I can use it in the future for other tasks.

    Thanks

    Eddie

  7. #7
    David Biddulph
    Guest

    Re: IF question

    "punter" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hey that works even better. One question about the formula: What is
    > the meaning of the (-- between the Sumproduct( and the (M2? The formula
    > works great but I'm wondering what exatctly the (-- does so I can use it
    > in the future for other tasks.


    The double unary minus forces the values to be numeric, so is useful if you
    are starting with values which are logical (TRUE/FALSE) or text.

    The first unary minus reverses the sign, and the second reverses it again.
    http://www.mcgimpsey.com/excel/variablerate1.html gives an example.
    --
    David Biddulph



+ 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