+ Reply to Thread
Results 1 to 22 of 22

Data in two cells - return a numeric value

  1. #1
    Registered User
    Join Date
    03-11-2013
    Location
    Dallas
    MS-Off Ver
    Excel 2010
    Posts
    3

    Data in two cells - return a numeric value

    Hello all, I have spend the last couple of hours before posting this - I'm not a newbie and haven't figured out most of my formulas on this WS I am working on except for this.

    I have a worksheet that has the following data

    Column: K11, L11, M11 & N11 has people's names in it.
    Column O11 - O200 has abbreviations to a service.

    I need to create a forumla that says, If K11 (Juston) has CS (Calibration Services) inside Column O11, return a value.

    So Juston has 4 CS, I need Excel to know that and display that is found 4 Juston's matching CS.

    So if Mark has 50 PM's assigned to their name, I want Excel to display that it found through the whole sheet 50 PM's matching Mark's name.

    Hope this makes sense.

    Here is a snip of my Worksheet:

    Capture.PNG

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Data in two cells - return a numeric value

    I think you need to be looking at COUNTIFS. That would seem to be appropriate for the first part and consistent formula use for the second part, although COUNTIF would probably do just as well as there's only one condition.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    03-11-2013
    Location
    Dallas
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Data in two cells - return a numeric value

    TMS:

    I have tried the "CountIFS" formula but no good.

    Here is my formula, and it could be just me and how I am working the spreadsheet out in my head on how it should work.

    Just to clarify, I am looking for Excel to look at a worksheet, if Juston has data in another column (CS) then total it up. Am I making sense?

    Here is my formula:

    =COUNTIF(Sheet3!G2:P5000,"=SR")

    (Sheet 3 has all of the detail data on it, Sheet 1 is my summary sheet where I am trying to combine the data where it's a one stop show for the other info)

    G2 cell has the employee's name. The "P" column has all of the CS, PM, IS, etc. etc. codes in it.

  4. #4
    Registered User
    Join Date
    03-11-2013
    Location
    Dallas
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Data in two cells - return a numeric value

    Attached is copy of the data that I extracted.

    Trying to figure out:
    how many CS, ISFM, IS, Tim had.
    how many CS, ISFM, IS Tim had.

    ...etc ...etc etc...


    Worksheet-For-Web.xlsx

  5. #5
    Registered User
    Join Date
    12-16-2012
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010 & 2007
    Posts
    66

    Re: Data in two cells - return a numeric value

    I used the =COUNTIFS function. First I had to extract all Unique records for the Techs and the Services. I created a separate table.

    There may be a more elegant way to do it, but I just set up each record to do four separate COUNTIF calculations, one for each of your Tech columns. An example of the COUNTIF formula is here:
    Please Login or Register  to view this content.
    I've attached the sheet with my table in it. I think there's at least one typo, because you have one Tech1 listed as CRE. But I added "him" as a tech just in case.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    03-12-2013
    Location
    aailange according
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Data in two cells - return a numeric value

    jkray622 (sorry, had to change screen names because excelforum lost my login over night):

    So I have been working on this through the night and now into this morning and I still can not seem to get it to work - sort of. I am working between to worksheet in one file and I get data to pull over but when I update the 'Closed Tickets' tab, it does not update in the 'Summary' tab like it does in yours. Could you look at the attached spreadsheet and let me know what I am doing wrong?

    For the record, I don't want you to complete the worksheet for me! This will be used by several people moving forward as a 'template and I am just trying to figure out the 'dirty work' so it makes others jobs easier. So I appreciate your help!


    Februrary Summary - Updated-v2.xlsx

  7. #7
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Data in two cells - return a numeric value

    Your COUNTIFS in K9 of summary is counting as follows
    Tim appears as Tech 1 for CS + as Tech 2 for ISFM + as Tech 3 for IS + Tech 4 as NEI
    Is that what you wanted?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  8. #8
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Data in two cells - return a numeric value

    duplicate post
    Last edited by ChemistB; 03-12-2013 at 10:10 AM.

  9. #9
    Registered User
    Join Date
    03-12-2013
    Location
    aailange according
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Data in two cells - return a numeric value

    Yes, I am trying to get the spreadsheet to calcuate where ever Tim (either in Tech1, Tech2, Tech3, or Tech4 and has a CS, PM, etc in the Service column to add a number (total it up on the Summary sheet).

    Does that make any sense?

  10. #10
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Data in two cells - return a numeric value

    Okay, that's not what you're doing. It's only counting Tim's CS's as Tech 1, only Tim's ISFM's as Tech 2, etc.

    This formula in K9 gives 15 for Tim which I believe is the correct value

    =SUMPRODUCT(('Closed Tickets'!$K$11:$N$1000=K$8)*(('Closed Tickets'!$O$11:$O$1000='Closed Tickets'!$K$2)+('Closed Tickets'!$O$11:$O$1000='Closed Tickets'!$K$3)+('Closed Tickets'!$O$11:$O$1000='Closed Tickets'!$K$4)+('Closed Tickets'!$O$11:$O$1000='Closed Tickets'!$K$5)))
    Does that formula make sense to you?

  11. #11
    Registered User
    Join Date
    03-12-2013
    Location
    aailange according
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Data in two cells - return a numeric value

    ChemistB:

    So I used your fomula:

    =SUMPRODUCT(('Closed Tickets'!$K$11:$N$1000=I$8)*(('Closed Tickets'!$O$11:$O$1000='Closed Tickets'!$K$2)+('Closed Tickets'!$O$11:$O$1000='Closed Tickets'!$K$7)+('Closed Tickets'!$O$11:$O$1000='Closed Tickets'!$K$7)+('Closed Tickets'!$O$11:$O$1000='Closed Tickets'!$K$7)))

    And changed it where Calvin should only show one Service Required (aka: Service Request) but the formula shows Calvin having three (3) Service Tickets when he really have only one. His name is only listed once in TECH1, TECH2, TECH3, TECH4 column with SR in the "Services" column. I do understand the formula and did make a few tweaks (as you see above) but I don't enough about text to number in Excel to write my own formula which is why I am asking for assistance.

    Thanks again for your help - everyone's help!

  12. #12
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Data in two cells - return a numeric value

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In this last part is where you want to include all the catagories (from Closed TicketsK2:K8 that you want to count for Calvin. Here you are saying count CS's for Calvin (K2) once and PM's (K7) 3 times. Does that help?

  13. #13
    Registered User
    Join Date
    03-12-2013
    Location
    aailange according
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Data in two cells - return a numeric value

    Now I am getting even more confused. Am I looking for something that just maybe can't be done in Excel?

  14. #14
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Data in two cells - return a numeric value

    No, tell me what categories you want counted. I assume that maintenance would be the category codes in K2:K5?

  15. #15
    Registered User
    Join Date
    03-12-2013
    Location
    aailange according
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Data in two cells - return a numeric value

    K2:K7 (on the Closed Ticket Report)

    CS Calibration Services
    ISFM In Shop FM&ME
    IS In Shop Repair
    NEI New Equipment Install
    PM Preventative Maintenance
    SR Service Requested

    So if Juston is in any of the Tech fields (TECH1, TECH2, TECH3, or TECH4) and in the "Service" column has SR, I want Juston to show on the Summary sheet that he did a Service Call. I am pulling the tech's name from a static field on the "Summary" page in I8 - Q8.

    So if Juston (on the Closed Ticket tab) has his name once is each category (CS, ISFM, IS, NEI, PM, and SR) then on the summary sheet, I am looking for a 1 in each category under the header (name) "Juston" (as an example)

    Capture2.PNG

  16. #16
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Data in two cells - return a numeric value

    Ahhh, okay, give me a minute

  17. #17
    Registered User
    Join Date
    03-12-2013
    Location
    aailange according
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Data in two cells - return a numeric value

    I thought I had it with one formula I came up with but A.) it wasn't updating dynamically and B.) it wasn't picking up the correct Service Name.

  18. #18
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Data in two cells - return a numeric value

    I inserted a column B for Code (see attachment) Then in J9 copied across and down

    =SUMPRODUCT(('Closed Tickets'!$K$11:$N$1000=J$8)*('Closed Tickets'!$O$11:$O$1000=$B9))
    Attached Files Attached Files

  19. #19
    Registered User
    Join Date
    03-12-2013
    Location
    aailange according
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Data in two cells - return a numeric value

    Perfect! I feel like a dumb dumb for not figuring that out, it's simple but yet for some reason complex enough that I couldn't figure that out.

  20. #20
    Registered User
    Join Date
    03-12-2013
    Location
    aailange according
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Data in two cells - return a numeric value - SOLVED

    Extremely helpful and took the time to understand what I was trying to accomplish!

  21. #21
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Data in two cells - return a numeric value

    The more you use it, the more you'll figure it out. Glad I could help.

  22. #22
    Registered User
    Join Date
    03-12-2013
    Location
    aailange according
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: Data in two cells - return a numeric value

    Just FYI

    I reworked the formula, after I figured out the formula, understood the formula and now know how it works.

    I changed it to:

    =SUMPRODUCT(('Closed Tickets'!$J$12:$M$1001=H$9)*('Closed Tickets'!$D$12:$D$1001=$A10))

    Basically, instead of using "Service Codes", I am capturing (using) what is already being put down since it won't change and using it against what is on the "Summary" page. So the rules look up what is on the "Closed Ticket" tab that is under D12:D1000 (which is the service that was performed) and then match it to the Summary sheet and look up the tech and then display the number.

    Still, wouldn't of been able to do it w/o you. Thank you again, I most defiantly owe you one!

+ 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