+ Reply to Thread
Results 1 to 8 of 8

IF XX meets value 1 then return zero for the remaining columns

  1. #1
    Registered User
    Join Date
    05-26-2009
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    36

    IF XX meets value 1 then return zero for the remaining columns

    Hi Guy's

    simple one for you!

    Have extacted data as per attached spreadsheet

    Columns A - J Rows 1 - 7.
    each will have a combination of data called AAA - GGG, AAA being the most important value.

    I have asked to return a value of 1 (Colums H-N) when one of the conditions are met.

    the next step is to then return value of 1 in columns P-V, but when value 1 is returned all other columns should reflect zero.

    the idea is to capture the most important value

    i have uploaded a sample sheet, as this was a little difficult to describe.

    many thanks
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    07-19-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    92

    Re: IF XX meets value 1 then return zero for the remaining columns

    Quote Originally Posted by Trig79 View Post
    the next step is to then return value of 1 in columns P-V, but when value 1 is returned all other columns should reflect zero.
    I think you are trying to say is
    1) P = H (always)
    2) If P is 1, then Q = 0, else Q = I
    3) If P or Q is 1, then R = 0, else R = J
    4) If P or Q or R is 1, then S = 0, else S = K

    and so on?

  3. #3
    Registered User
    Join Date
    05-26-2009
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: IF XX meets value 1 then return zero for the remaining columns

    hi

    yes you summed it up better than me

    what you say is correct

    thanks

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: IF XX meets value 1 then return zero for the remaining columns

    TRy this, copied across and down...
    =IF(SUM($O2:O2)>0,0,COUNTIF($A2:$G2,P$1))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    05-26-2009
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: IF XX meets value 1 then return zero for the remaining columns

    unfortunately not, it fails on row 3

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: IF XX meets value 1 then return zero for the remaining columns

    How so?

    I get a 1 under BBB, and all the rest are 0?

  7. #7
    Registered User
    Join Date
    05-26-2009
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: IF XX meets value 1 then return zero for the remaining columns

    sorry was about to re-post, finger trouble at my end.

    It works fine, thanks for the answer, i would never have got there.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: IF XX meets value 1 then return zero for the remaining columns

    you'r welcome. If this answered your question, please take a moment to mark the thread as "solved" - it helps keep things neat and tidy lol, and consider adding the reputation to those that helped (see points 2 & 3 below)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] cut the cells to 3 columns in excel & remaining columns should be added to the next row
    By kr61665 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-06-2013, 11:07 AM
  2. Replies: 3
    Last Post: 04-20-2013, 09:55 PM
  3. Pivot Table: Return Value when <5 and show remaining
    By Flyinace2000 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-15-2012, 02:36 PM
  4. Return value AFTER column meets condition
    By jbc242 in forum Excel General
    Replies: 2
    Last Post: 06-26-2011, 11:40 PM
  5. Return a range that meets a specific criteria
    By Brenda Blanchard in forum Excel General
    Replies: 5
    Last Post: 03-26-2009, 11:54 PM

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