+ Reply to Thread
Results 1 to 10 of 10

Trying to extract data from large spreadsheet

  1. #1
    Registered User
    Join Date
    05-28-2014
    Posts
    4

    Question Trying to extract data from large spreadsheet

    I have a very large spreadsheet that was exported from an ecommerce site with close to 1000 products. I have one column that I need to extract some text from. This column holds all of the html from the product description and is huge. I only need to extract the actual description of the product, but am having a very hard time figuring out how to do it. I've tried using the mid, left, and right function; but not all of the html is the same so it's not really working the way I need it to.

    I have multiple tags throughout the html that I can use with the mid function, but there is more than one occurrence of them. So, how can I tell it to start at the 4th occurrence? I've spent countless hours searching, but I'm a complete novice when it comes to excel and I don't even know what to search for. I end up looking through sites that explain how to pull the Y out of XYZ, which is what I need, just on a much larger (and more complicated) scale.

    It was suggested that I set up a macro that will find the 4th occurrence of the word, and then uses the mid function to pull the data out, but when I try to find the word, it says it doesn't exist even though I can see it right in front of me.

    Does anyone have any suggestions or can point me in the right direction? I don't have a problem learning it for myself, I just don't know what to look for.

  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: Trying to extract data from large spreadsheet

    Without some sample data, how can we help? Please attach a workbook with a selection of samples and manually enter your expected result.
    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
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: Trying to extract data from large spreadsheet

    I've done in the past, a loop through all the HTML tags like <BR> etc and replacing them with spaces. There is also PlainText in Access which removes them, could that be a method for cleansing?
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  4. #4
    Registered User
    Join Date
    05-28-2014
    Posts
    4

    Re: Trying to extract data from large spreadsheet

    I thought about doing that, but the description itself has some html formatting in it that I would like to keep.

    Give me a sec and I will post a workbook that shows what I'm working with.

  5. #5
    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: Trying to extract data from large spreadsheet

    Thanks!

  6. #6
    Registered User
    Join Date
    05-28-2014
    Posts
    4

    Re: Trying to extract data from large spreadsheet

    Ok, here is the sample.
    Last edited by Caleesie; 05-29-2014 at 09:19 AM.

  7. #7
    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: Trying to extract data from large spreadsheet

    Blimey! OK, I'm taking a look now ...

  8. #8
    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: Trying to extract data from large spreadsheet

    This may or may not work ...

    Assuming that the data is in A2, and that all similar entries contain "ITEMDESC" and "ITEMVIDEO" in the same places relative to each other (you have only given me one example to work with!), try:

    =MID(A2,((FIND(CHAR(34)&"ITEMDESC"&CHAR(34),A2)+14)),(LEN(A2)-((FIND(CHAR(34)&"ITEMDESC"&CHAR(34),A2)+14)))-(LEN(A2)-FIND(CHAR(34)&"ITEMVIDEO"&CHAR(34),A2)+30))

    An hour and a half to get this far, so I HOPE it works!!!

  9. #9
    Registered User
    Join Date
    05-28-2014
    Posts
    4

    Re: Trying to extract data from large spreadsheet

    Thank you so much AliGW! There are still a few minor things to clean up, but it worked great!!

  10. #10
    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: Trying to extract data from large spreadsheet

    Phew! I can go and get lunch now, then!!!

  11. #11
    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: Trying to extract data from large spreadsheet

    Oh, and thanks for the rep! BTW, I'm no genius, just enjoy logic puzzles and building formulae like jigsaws from smaller elements that I make work.

+ 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. best way to filter and extract data from large data list
    By boltonlad2k in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-19-2014, 11:26 AM
  2. Extract Data From A Large Range Using VBA
    By Paul_SR in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-13-2014, 12:16 PM
  3. Extract Data from large Column
    By gregpl in forum Excel Formulas & Functions
    Replies: 24
    Last Post: 08-13-2013, 12:56 PM
  4. [SOLVED] Extract data that meets specific condition from large raw data
    By tekobayashi in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-27-2012, 03:50 AM
  5. Extract data in large dagtabase
    By firsttobecool in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-09-2012, 03:05 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