+ Reply to Thread
Results 1 to 18 of 18

Data from Sheet2 will populate if certain cell in Sheet1 have numerical value.

  1. #1
    Registered User
    Join Date
    10-18-2013
    Location
    Arlington, Texas
    MS-Off Ver
    Excel 2007
    Posts
    60

    Data from Sheet2 will populate if certain cell in Sheet1 have numerical value.

    Hello,

    is there an equation that will populate the "task" for the employee if column C has a numerical value.

    for example if employee1 has 8 in cell C2 then D2 = "Task1", E2 = "Task2" and G4 = "Task4" (task are from "task" tab).

    Any help would be greatly appreciated.

    Please see attach excel book.

    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Data from Sheet2 will populate if certain cell in Sheet1 have numerical value.

    In C2 Cell of Task Sheet

    =IF(SUMPRODUCT((Hours!$A$2:$A$10=$A2)*(Hours!$B$2:$B$10=$B2)*(Hours!D$2:D$10<>"")),"x","")

    Drag it down...


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    10-18-2013
    Location
    Arlington, Texas
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Data from Sheet2 will populate if certain cell in Sheet1 have numerical value.

    Sixthsense,

    thanks for your help but the "x" populated in the Task Sheet instead of the Hours sheet.

    is there anyway to make "task1, task2 and task4"in Task sheet to populate in row2 of hours sheet if c2 has a numerical value?

    thanks again for you help.

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Data from Sheet2 will populate if certain cell in Sheet1 have numerical value.

    In D2 Cell of Hours Sheet

    =IF(SUMPRODUCT((Task!$A$2:$A$10=$A2)*(Task!$B$2:$B$10=$B2)*(Task!C$2:C$10<>"")),INDEX(Task!$C$1:$K$1,,COLUMN(A$1)),"")

    Drag it down and right....

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

    Re: Data from Sheet2 will populate if certain cell in Sheet1 have numerical value.

    @Sixthsense

    I think you can exclude (Task!$B$2:$B$10=$B2) from Sumproduct. What do you say?

    I must say that It was a brilliant solution provided by you. Not sure about OP but you deserve a * from me.
    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.

  6. #6
    Registered User
    Join Date
    10-18-2013
    Location
    Arlington, Texas
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Data from Sheet2 will populate if certain cell in Sheet1 have numerical value.

    @Sixthsense and sktneer,

    we are so close to solving this.

    both equations work great except when Hours (column c in Hours sheet) is blank the exclusion in column D through L still populate with "TaksX" in Hours sheet.

    is there a way to make it not to populate if column c equal to blank?

    thanks again for all of your help.

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

    Re: Data from Sheet2 will populate if certain cell in Sheet1 have numerical value.

    You can use........

    Please Login or Register  to view this content.

  8. #8
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Data from Sheet2 will populate if certain cell in Sheet1 have numerical value.

    Quote Originally Posted by sktneer View Post
    @Sixthsense

    I think you can exclude (Task!$B$2:$B$10=$B2) from Sumproduct. What do you say?
    Yes exactly

    As you rightly pointed that the Emp # is enough when comparing the data and thanks for the correction and rep

  9. #9
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Data from Sheet2 will populate if certain cell in Sheet1 have numerical value.

    Quote Originally Posted by sktneer View Post
    You can use........

    Please Login or Register  to view this content.
    In the suggested formula just add a Trim($C2) function for C2 cell

  10. #10
    Registered User
    Join Date
    10-18-2013
    Location
    Arlington, Texas
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Data from Sheet2 will populate if certain cell in Sheet1 have numerical value.

    @ Sixthsense

    i have very limit knowledge about excel.

    i tried both equation you've suggested and both work.

    i was just wondering what does the "trim" function does that the first equation would not do?

  11. #11
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Data from Sheet2 will populate if certain cell in Sheet1 have numerical value.

    Trim() just clears the leading and trailing spaces and allows only one space in between each characters if there is multiple spaces.

  12. #12
    Registered User
    Join Date
    10-18-2013
    Location
    Arlington, Texas
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Data from Sheet2 will populate if certain cell in Sheet1 have numerical value.

    @ Sixthsense.

    again thank you so much for helping me!

  13. #13
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Data from Sheet2 will populate if certain cell in Sheet1 have numerical value.

    Glad it helps you and thanks for the feedback and rep

  14. #14
    Registered User
    Join Date
    10-18-2013
    Location
    Arlington, Texas
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Data from Sheet2 will populate if certain cell in Sheet1 have numerical value.

    @ Sixthsense.

    The equation worked great except when the employee task change in column C through K in "Task" sheet the information in column D through L in "Hours" sheet does not change.

    Is there something we can do to make the "Hours" sheet update if the information in the "Task" sheet change?

    thanks.

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

    Re: Data from Sheet2 will populate if certain cell in Sheet1 have numerical value.

    If you mean by putting another "x" in task sheet for any Emp#, it does reflect on the hour sheet. Then where is the problem?

  16. #16
    Registered User
    Join Date
    10-18-2013
    Location
    Arlington, Texas
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Data from Sheet2 will populate if certain cell in Sheet1 have numerical value.

    @ sktneer,

    I've figure out what went wrong. It was the user and not the equation.

    When I update the "task" sheet i use the "space bar" instead of the "delete" key. lol

    all is good now.

    but if there is a way to twitch the equation so that other users would not make the same mistake as i did that would be wonderful.

    thanks again for your respond.

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

    Re: Data from Sheet2 will populate if certain cell in Sheet1 have numerical value.

    One way to stop the user to input any character other than x is as follows......

    Select the range C2:K10 in the task sheet. Go to the Data-->Data Validation-->List (in Allow field) -->x (in the source field) and click OK and you are done. Now user can only input x in the task sheet in the range specified. If he inputs any other character or space, he will get an error message.

    I hope this helps.

  18. #18
    Registered User
    Join Date
    10-18-2013
    Location
    Arlington, Texas
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: Data from Sheet2 will populate if certain cell in Sheet1 have numerical value.

    @ sktneer,

    it works great! i like it.

    thanks again for your help!

+ 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. Auto populate data from Sheet1 to Sheet2
    By raju_air in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-27-2013, 02:34 AM
  2. Replies: 6
    Last Post: 07-25-2013, 02:58 PM
  3. Replies: 1
    Last Post: 12-30-2012, 07:52 PM
  4. Replies: 4
    Last Post: 07-27-2008, 06:26 AM
  5. [SOLVED] How do I get data entered in sheet1 to auto populate sheet2?
    By MikeM in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-15-2006, 08:51 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