+ Reply to Thread
Results 1 to 9 of 9

Splitting a field?

  1. #1
    Registered User
    Join Date
    03-07-2008
    Posts
    5

    Splitting a field?

    I made a excel file that tracks how many cars we sell. I have it tracking the units sold and each salesperson and how many they sell. So on the 3rd sheet, the sales tracking sheet, when one of the cells in the other 2 sheets see's a name, i.e. "STEVE" or "VERN" or whatever, it adds it.

    Now, my question is, if 2 sales people sell the car and I need to split the unit, 1/2's, can that be done? I have a "salesperson" column and a "Split deal" column. Just wonder if this is possible?

    Thanks in advance!

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Can you post a sample file for the layout filled in with a couple of examples

    Excel files need to be zipped then use the paperclip icon on the toolbar (when composing a post) to add the file

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    03-07-2008
    Posts
    5
    the last sheet has the salespeople info. I need the NEW and USED pages to read a "SPLIT sale" which it only reads the "salesperson" as I don't know how to formulate any further.

    hope this helps? and thanks!
    Attached Files Attached Files

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Example for new sheet

    =SUMPRODUCT(--(New!$D$2:$D$29='salesperson tracker'!A3)*(New!$E$2:$E$29=""))+SUMPRODUCT(--(New!$E$2:$E$29='salesperson tracker'!A3))/2+SUMPRODUCT(--(New!$D$2:$D$29='salesperson tracker'!A3)*(New!$E$2:$E$29<>""))/2
    Where this part counts if they are the sole saleman e.g will return 4 for Tom
    SUMPRODUCT(--(New!$D$2:$D$29='salesperson tracker'!A3)*(New!$E$2:$E$29=""))
    and this returns a half for Col E
    +SUMPRODUCT(--(New!$E$2:$E$29='salesperson tracker'!A3))/2
    and this returns half for Col D if Col E isn't blank
    +SUMPRODUCT(--(New!$D$2:$D$29='salesperson tracker'!A3)*(New!$E$2:$E$29<>""))/2
    HTH

    VBA Noob

  5. #5
    Registered User
    Join Date
    03-07-2008
    Posts
    5
    Ok...I'm trying to mess with this....now, bear with me as I'm a excel 'hack' and figure things out as I go, sometimes

    this top formula you helped with will go on the "salestracker" sheet, under the NEW column for each salesperson?

    If so, do I put the salesperson name between the ""? And then do I copy and paste, changing "new" to "used" for the used column?

    thanks for all the help!

  6. #6
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Goes in B3 and drag down

    Then put this in C3 and drag down

    =SUMPRODUCT(--(Used!$D$2:$D$29='salesperson tracker'!A3)*(Used!$E$2:$E$29=""))+SUMPRODUCT(--(Used!$E$2:$E$29='salesperson tracker'!A3))/2+SUMPRODUCT(--(Used!$D$2:$D$29='salesperson tracker'!A3)*(Used!$E$2:$E$29<>""))/2
    VBA Noob

  7. #7
    Registered User
    Join Date
    03-07-2008
    Posts
    5
    wow! that worked like a charm! Thank you so very much! ever need a car...let me know

    Thanks again!!

  8. #8
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    No problem and thx for the offer but live in the Uk

    VBA Noob

  9. #9
    Registered User
    Join Date
    03-07-2008
    Posts
    5
    lol! well, hey, it's the thought that counts

    Thanks again and keep in touch!

+ 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