+ Reply to Thread
Results 1 to 9 of 9

Extract data from sheet with different data locations.

Hybrid View

  1. #1
    Registered User
    Join Date
    11-20-2013
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    8

    Extract data from sheet with different data locations.

    Howdy,

    I would typically give this a shot before asking for assistance however, I am not even sure if what I am trying to accomplish is possible.

    All of the details are on the right in the attached spreadsheet.

    Tell me I'm crazy?

    I currently copy the numbers in question to another workbook where I keep track of the employee's hours weekly. There are 150 Employees to do this for. Just hoping to save some time.

    Thanks All.
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,956

    Re: Extract data from sheet with different data locations.

    Are you willing to use a helper column for this?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,956

    Re: Extract data from sheet with different data locations.

    You need to try and avoid using merged cells like you are in that file, it causes all sorts of problems with formulas

    Assuming you are OK with a helper column...
    These are all based on you unmerging cells.
    U13=IF(E13="",U12,E13
    copied down

    Then for the summary...
    Z15=SUMIF(U:U,Y15,J:J)
    copied down

    For the 2nd part...
    AB22=SUMIFS(J:J,U:U,Y22,L:L,Z22)
    copied down.

    Points to note -
    1. E28 has a trailing space - remove that
    2. in the 2nd table, copy the names into the blank spaces (or use the approach I used to pull in all teh names)

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,852

    Re: Extract data from sheet with different data locations.

    Put this formula in cell V13:

    =IF(E13<>"",MAX(V$12:V12)+1,IF(O13="Total:",ROUND(MAX(V$12:V12)-0.5,1),"-"))

    and copy down beyond the extent of your data (it might look better if you centre the values). Then in A2 of the other sheet you can use this formula:

    =IF(ROWS($1:1)>MAX(AttendanceWagesNoBreaks_JJ!V:V),"",INDEX(AttendanceWagesNoBreaks_JJ!E:E,MATCH(ROWS($1:1),AttendanceWagesNoBreaks_JJ!V:V,0)))

    and this one in B2:

    =IF(A2="","",ROUND(INDEX(AttendanceWagesNoBreaks_JJ!M:M, MATCH(ROUND(ROWS($1:1)-0.5,1),AttendanceWagesNoBreaks_JJ!V:V,0)-1),2))

    then copy these down as far as you need.

    Hope this helps.

    Pete

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Extract data from sheet with different data locations.

    Hi dtexter,

    Excel has a new tool called Power Query that can make short work of your problem.

    You need to*install it as an Add-In for 2010 and 2013*Excel but it is built into 2016.

    After pulling in your worksheet into power query, you would "Fill Down" the names and*filter to keep the largest *** hours. *After*building a Power Query, you can do the same thing to each day or week files.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  6. #6
    Registered User
    Join Date
    11-20-2013
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    8

    Re: Extract data from sheet with different data locations.

    Quote Originally Posted by Pete_UK View Post
    Put this formula in cell V13:

    =IF(E13<>"",MAX(V$12:V12)+1,IF(O13="Total:",ROUND(MAX(V$12:V12)-0.5,1),"-"))

    and copy down beyond the extent of your data (it might look better if you centre the values). Then in A2 of the other sheet you can use this formula:

    =IF(ROWS($1:1)>MAX(AttendanceWagesNoBreaks_JJ!V:V),"",INDEX(AttendanceWagesNoBreaks_JJ!E:E,MATCH(ROWS($1:1),AttendanceWagesNoBreaks_JJ!V:V,0)))

    and this one in B2:

    =IF(A2="","",ROUND(INDEX(AttendanceWagesNoBreaks_JJ!M:M, MATCH(ROUND(ROWS($1:1)-0.5,1),AttendanceWagesNoBreaks_JJ!V:V,0)-1),2))

    then copy these down as far as you need.

    Hope this helps.

    Pete
    This did work Pete!

    Any thoughts on the second part of the problem? Separating the results by job title?

    Thanks!

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,956

    Re: Extract data from sheet with different data locations.

    Did you check post #3?

  8. #8
    Registered User
    Join Date
    11-20-2013
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    8
    Quote Originally Posted by FDibbins View Post
    Did you check post #3?
    Yes, I just started working with it now. Will play more tomorrow.

  9. #9
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,956

    Re: Extract data from sheet with different data locations.

    ok. keep me posted

+ 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. [SOLVED] extract and split data in one cell from one sheet to another sheet in two cells in vba
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-16-2017, 08:21 AM
  2. Replies: 3
    Last Post: 12-18-2014, 10:27 AM
  3. Replies: 1
    Last Post: 07-05-2014, 04:07 PM
  4. [SOLVED] Desire data extract from the sheet “input” to the sheet “output”
    By nur2544 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 06-24-2014, 02:19 PM
  5. [SOLVED] Automatically Extract comment/data from Sheet 1 to populate Sheet 2
    By nadagoat83 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-13-2014, 08:07 AM
  6. Replies: 18
    Last Post: 04-04-2014, 03:56 PM
  7. Search for Excel file and the sheet within that from the given table data and extract data
    By adrian_slash in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-23-2013, 07:55 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