+ Reply to Thread
Results 1 to 8 of 8

Getting data from one sheet to another, depending on two text values

  1. #1
    Registered User
    Join Date
    09-04-2017
    Location
    London, England
    MS-Off Ver
    Microsoft365
    Posts
    9

    Getting data from one sheet to another, depending on two text values

    C3 in Sheet 2 needs to contain the value of G3 in Sheet 1 IF B3 in sheet 1 contains a specific text and C3 in Sheet 1 contains a specific text -

    So for example, If a driver whose name gets entered via drop down in Sheet 1, B3, has an incident, the title of which is entered by drop down in Sheet 1, C3, then the cost of that incident is entered into Sheet 1, G3. The value in Sheet 1 G3, then needs to be entered into Sheet 2, C3.

    Help!

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,430

    Re: Getting data from one sheet to another, depending on two text values

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a description of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    09-04-2017
    Location
    London, England
    MS-Off Ver
    Microsoft365
    Posts
    9

    Re: Getting data from one sheet to another, depending on two text values

    Apologies - I'm new at these forums. Please find attached a mock up of what I am trying to achieve. Sheet 2 is basically counting the occurrences of certain types of incidents for each person and attributing the total costs of those incidents.
    Attached Files Attached Files

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Getting data from one sheet to another, depending on two text values

    In B3:
    =IF($A3="","",COUNTIFS(Driver!$B:$B,$A3,Driver!$C:$C,B$1))


    In C3:
    =IF($A3="","",SUMIFS(Driver!$G:$G,Driver!$B:$B,$A3,Driver!$C:$C,B$1))

    Select BOTH cells and drag formula across/down as far as needed.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Getting data from one sheet to another, depending on two text values

    ... or if you find all those 0s distracting, in B3:

    =IFERROR(1/(1/COUNTIFS(Driver!$B:$B,$A3,Driver!$C:$C,B$1)),"")

    and in c3:

    =IFERROR(1/(1/SUMIFS(Driver!$G:$G,Driver!$B:$B,$A3,Driver!$C:$C,B$1)),"")

    again select both cells and drag...

  6. #6
    Registered User
    Join Date
    09-04-2017
    Location
    London, England
    MS-Off Ver
    Microsoft365
    Posts
    9

    Re: Getting data from one sheet to another, depending on two text values

    Thanks so much for your help - extremely useful!

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Getting data from one sheet to another, depending on two text values

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  8. #8
    Registered User
    Join Date
    09-04-2017
    Location
    London, England
    MS-Off Ver
    Microsoft365
    Posts
    9

    Re: Getting data from one sheet to another, depending on two text values

    In a slight amendment to the original question,I am now looking to add a third instruction to these formulae. So, I want the same thing to happen but ONLY if 'Yes' is selected in Column L, in the sheet named 'Driver'.

    I am sure this must be more simple than I am trying to make it!

+ 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: 0
    Last Post: 07-21-2015, 10:26 PM
  2. Displaying some cells data depending on selected text from other sheet
    By kumarjohn in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 01-02-2014, 12:21 PM
  3. [SOLVED] Find value depending on two values from different sheet
    By Masun in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-28-2013, 04:48 AM
  4. [SOLVED] Sorting data from a master sheet to multiple sheets depending on values in a given column
    By kodos10 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-30-2013, 05:46 AM
  5. How to make cell values equal certain text depending on other cells' text
    By Wes Borland in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-28-2013, 02:08 PM
  6. [SOLVED] deleting rows depending on values on another sheet
    By ghynes in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-07-2013, 07:16 PM
  7. Display text depending on values of 3 different cells?
    By henrat in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-22-2005, 02:09 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