+ Reply to Thread
Results 1 to 11 of 11

Extract data from 1st column while skipping blanks

  1. #1
    Registered User
    Join Date
    06-07-2015
    Location
    va
    MS-Off Ver
    office 365
    Posts
    19

    Extract data from 1st column while skipping blanks

    Good morning,

    I'm trying to create a sheet based off a pasted report I'll be getting daily. The report I get has a name in the first column which then shows daily hours below which start in the second column. At the end of each employee is a row that states "Total" and then has a number of different totals. The one column I need data from is the "Sold hours" column. I attached an xlsx file which has the report and I added a sheet with an example of what I'm trying to get. The problem I have is that I don't know how to have it list the names and sold hours on a sheet while not showing all the other daily values. Any help would be greatly appreciated.

    Thanks
    Mike
    Attached Files Attached Files

  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,916

    Re: Extract data from 1st column while skipping blanks

    Administrative Note:

    Members will tailor the solutions they offer to the version (NOT release number) of Office (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this. Thanks.
    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
    06-07-2015
    Location
    va
    MS-Off Ver
    office 365
    Posts
    19

    Re: Extract data from 1st column while skipping blanks

    I changed it. Thanks

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Extract data from 1st column while skipping blanks

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

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Extract data from 1st column while skipping blanks

    In the attached please note:

    There were trailing spaces in the list of Technicians and leading spaces in the date column (" *TOTAL*"). I cleaned those up to simplify this. In the process the dates which were text "dates" were converted to actual numeric dates.

    I created some Dynamic Named Ranges (DNRs) in Name Manager. If you are not familiar with DNRs they size themselves automatically to fit their data. There is a small table included that can be deleted which shows how they are defined. It looks like this:


    DATE....
    =Sheet1!$B$2:INDEX(Sheet1!$B:$B,ROWS(Technician)+1)
    SOLD
    =Sheet1!$D$2:INDEX(Sheet1!$D:$D,MATCH("zzzzzzz",Sheet1!$A:$A)-7)
    Technician
    =Sheet1!$A$2:INDEX(Sheet1!$A:$A,MATCH("zzzzzzz",Sheet1!$A:$A)-7)


    Then in A1 and copied down this formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and in B1 and copied down this formula
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

  6. #6
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Extract data from 1st column while skipping blanks

    Please try

    =LET(z,Sheet1!A2:J2000,a,INDEX(z,,1),b,INDEX(z,,2),d,INDEX(z,,4),IF({1,0},FILTER(a,TRIM(a)>""),FILTER(d,b=" *Total*")))
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    06-07-2015
    Location
    va
    MS-Off Ver
    office 365
    Posts
    19

    Re: Extract data from 1st column while skipping blanks

    Thanks Fluff13 and Bo_Ry those are very interesting formulas. I've never heard of LET. Can you possibly give a quick rundown of that formula? I don't quite understand how it operates.

  8. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Extract data from 1st column while skipping blanks

    With my solution this part filters the data to just show the rows with a name in col A or Total in col B & stores that in the variable d
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    This part calculates the total number of output rows, by subtracting 2 (to remove the S1 & grand total) & then dividing by 2 & stores that in the variable r
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    This art returns all the values in column 1 of d but only from odd numbered rows
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and the other index does much the same but takes the even numbered rows from column 4
    HTH

  9. #9
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Extract data from 1st column while skipping blanks

    Another (shorter) option
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    06-07-2015
    Location
    va
    MS-Off Ver
    office 365
    Posts
    19

    Re: Extract data from 1st column while skipping blanks

    Quote Originally Posted by Fluff13 View Post
    Another (shorter) option
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    What does the <>"" do?

    Sorry if I sound like an idiot.

  11. #11
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Extract data from 1st column while skipping blanks

    It means not equal to nothing, or to put it another not blank.

+ 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: 3
    Last Post: 12-06-2021, 11:53 AM
  2. [SOLVED] Retrieve Data from column while skipping blanks
    By whoisdane in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-03-2020, 11:18 PM
  3. Replies: 1
    Last Post: 05-21-2014, 04:30 PM
  4. [SOLVED] Combining data from multiple cells while skipping blanks
    By htek9 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 07-17-2012, 03:21 PM
  5. Extract data by skipping blanks into a summarized form
    By Alina in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-14-2006, 08:10 PM
  6. Replies: 2
    Last Post: 09-15-2005, 08:05 PM
  7. [SOLVED] Paste Special Skip Blanks not skipping blanks, but overwriting...
    By gsrosin in forum Excel General
    Replies: 0
    Last Post: 02-22-2005, 12:06 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