+ Reply to Thread
Results 1 to 4 of 4

Unable to get cell count when using line breaks char(10)

Hybrid View

  1. #1
    Registered User
    Join Date
    09-26-2014
    Location
    Pittsburgh, PA
    MS-Off Ver
    2007
    Posts
    2

    Unable to get cell count when using line breaks char(10)

    Hi Everyone,

    I've been banging my head against the wall for the past two days trying to get this to work.

    On sheet1 I have all the tracking data, sheet2 is resources for the spread sheet, sheet3 is the status of what the technicians have done, along with a chart. The problem lies on sheet3 when trying to count who did the work.

    I've recently added VB to allow for multiple techs to be selected when doing a task. There's only three tasks, New Install, SSHD Swap, Terminal Swap. There are times when two technicians do the install and I want to make sure they get credited for doing the work. When doing the CountIFs, the result zeros out when the cell has a line feed CHAR(10). When I add the line feed in the search criteria, it's ignored.

    =COUNTIFS(PALLP!$J$797:$J$800,A36,PALLP!$E$797:$E$800,"SSHD Swap")+COUNTIFS(PALLP!$J$797:$J$800,A36&CHAR(10)&"",PALLP!$E$797:$E$800,"SSHD Swap")+COUNTIFS(PALLP!$J$797:$J$800,""&CHAR(10)&A36,PALLP!$E$797:$E$800,"SSHD Swap")
    (I'm using the "SSHD Swap" because it was less to type while testing)

    For may sample data, I'm using Tech 31 and Tech 3

    I tried this formula too, but doesn't work.

    =SUM(IF(AND(A8=PALLP!$J$797:$J$800,"SSHD Swap"=PALLP!$E$797:$E$800)+IF(OR(A8&""=PALLP!$J$797:$J$800),(""&A8=PALLP!$J$797:$J$800),(""&A8&""=PALLP!$J$797:$J$800)),1,0))
    Any help/input would be greatly appreciated. File attached.

    John
    Attached Files Attached Files

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Unable to get cell count when using line breaks char(10)

    Hi John,
    Welcome to the Forum.

    May be this.....

    =COUNTIFS(PALLP!$J$797:$J$800,"*"&A36&"*",PALLP!$E$797:$E$800,"SSHD Swap")
    Before trying this input some values in col. J in the range J797:J800. May be in J797, you select multiple values first say Tech 5, then Tech 31 and then Tech 30 to see if the above formula gives you the count.

    Does this help?
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Registered User
    Join Date
    09-26-2014
    Location
    Pittsburgh, PA
    MS-Off Ver
    2007
    Posts
    2

    Re: Unable to get cell count when using line breaks char(10)

    You Rock!!! Sktneer

    That was the ticket. I could have sworn I tried that, but apparently not in that context.

    Marking as solved.

  4. #4
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Unable to get cell count when using line breaks char(10)

    You're welcome. Glad I could help. Thanks for the feedback as well.

+ 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. Replies: 8
    Last Post: 07-14-2014, 03:07 AM
  2. How to count the number of words in a cell with line breaks?
    By felipemejiag in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 06-06-2014, 11:42 AM
  3. Line breaks in a cell
    By nugentd1 in forum Excel General
    Replies: 1
    Last Post: 09-23-2011, 10:31 AM
  4. Remove Certain Line Breaks in cell
    By hollyc2424 in forum Excel General
    Replies: 1
    Last Post: 05-18-2011, 01:47 PM
  5. Removing Line Breaks In A Cell
    By Ross220681 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 03-10-2009, 11:14 AM

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