Consulting

Results 1 to 5 of 5

Thread: Solved: Populate hyphen for continuous three or more zero in a row

  1. #1
    VBAX Regular
    Joined
    Jun 2012
    Posts
    29
    Location

    Solved: Populate hyphen for continuous three or more zero in a row

    Hi
    I have 60 columns in the attached sheet. In the 61st column, I want to display hyphen symbol (-) for the particular row if the row contain more than three zero (>=0) continuously.

    In the attached excel, hyphen symbol should be displayed in column 'BP' for row 5, 10 and 16
    Is there any formula. Plz help me.
    Attached Files Attached Files

  2. #2
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    BP2 copied down:
    =IF(SUMPRODUCT(($F2:$BK2=0)*($G2:$BL2=0)*($H2:$BM2=0)) > 0,"-","")
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  3. #3
    VBAX Regular
    Joined
    Jun 2012
    Posts
    29
    Location
    Thanks p45cal for your great help.
    This formula also works for blank rows with no data. Is it possible to skip row (e.g. row number of 19 onwards in attached spreadsheet)

    Also this formula works for rows where data present in all the cells that means If data are missing for few cells of a particular row, the hyphen symbol still appears (e.g. row number 18, col AT-BC)
    Attached Files Attached Files

  4. #4
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    B2:
    [VBA]=IF(SUMPRODUCT(($F2:$BK2=0)*($G2:$BL2=0)*($H2:$BM2=0)*ISNUMBER($F2:$BK2)*IS NUMBER($G2:$BL2)*ISNUMBER($H2:$BM2)) > 0,"-","")[/VBA]
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

  5. #5
    VBAX Regular
    Joined
    Jun 2012
    Posts
    29
    Location
    Thanks p45cal for your great help. I have checked in large number of datasets. Its working fine

Posting Permissions

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