+ Reply to Thread
Results 1 to 24 of 24

Extract Text and Value from Cells to total

  1. #1
    Registered User
    Join Date
    01-31-2019
    Location
    Aberdeenshire,Scotland
    MS-Off Ver
    365
    Posts
    33

    Extract Text and Value from Cells to total

    Hello again I have another challenge for you experts. Same spreadsheet ....DEV1 but we'd like to be able to get a total figure (Quantity) for each type of veg for all the orders which are basically in Column B; there's also an alternative spreadsheet also attached ....DEV2 whether that makes any difference I don't know but again thanks in advance for your kind help as ever..

  2. #2
    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
    44,058

    Re: Extract Text and Value from Cells to total

    Unfortunately, you did not include expected answers. So a guess, based on the limited description:

    =TOROW(TEXTBEFORE(TEXTSPLIT(C2,"Quantity: "),")"),3)
    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

  3. #3
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Extract Text and Value from Cells to total

    I'd probably clean the data up using Power Query, and then pivot it - see attached.
    Attached Files Attached Files
    Rory

  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
    44,058

    Re: Extract Text and Value from Cells to total

    Or maybe this is what you want... you still haven't told us:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-31-2019
    Location
    Aberdeenshire,Scotland
    MS-Off Ver
    365
    Posts
    33

    Re: Extract Text and Value from Cells to total

    Apologies Glenn what we'd like to have is the total number of orders for each type of veg so for example the total number of Beetroot orders is 7..does that help??
    Last edited by WAULKMILLFH; 03-25-2024 at 11:38 AM.

  6. #6
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,005

    Re: Extract Text and Value from Cells to total

    Another guess,

    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    01-31-2019
    Location
    Aberdeenshire,Scotland
    MS-Off Ver
    365
    Posts
    33

    Re: Extract Text and Value from Cells to total

    Wow thank you that's very much appreciated I will look at this in greater depth later

  8. #8
    Registered User
    Join Date
    01-31-2019
    Location
    Aberdeenshire,Scotland
    MS-Off Ver
    365
    Posts
    33

    Re: Extract Text and Value from Cells to total

    Thank you all for your replies I am in awe of your expertise as always and will spend time later in earnest looking at your solutions

  9. #9
    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
    44,058

    Re: Extract Text and Value from Cells to total

    My take on it:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    01-31-2019
    Location
    Aberdeenshire,Scotland
    MS-Off Ver
    365
    Posts
    33

    Re: Extract Text and Value from Cells to total

    Many thanks again Glenn I really appreciate your kind help

  11. #11
    Registered User
    Join Date
    01-31-2019
    Location
    Aberdeenshire,Scotland
    MS-Off Ver
    365
    Posts
    33

    Re: Extract Text and Value from Cells to total

    Hi Glenn sorry to trouble you again...i find as the number of submissions increases in my spreadsheet that there are 'duplicates' in the Product/Total amount columns which your code kindly calculates....may well be something I've done wrong in which case apologies but if you have time could you have a look at it for me?
    Many thanksPlant Preorder Form 2024 - Excel Report(2024-03-29) dev.xlsx

  12. #12
    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 Text and Value from Cells to total

    There are items that look the same, but are not - Broccoli Green Sprouting, for instance, where one is preceede by a CHAR(10) and the other is not.
    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.

  13. #13
    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 Text and Value from Cells to total

    I think this fixes it:
    Please Login or Register  to view this content.

  14. #14
    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 Text and Value from Cells to total

    This works as well:

    Please Login or Register  to view this content.

  15. #15
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,433

    Re: Extract Text and Value from Cells to total

    Here is another solution with a shorter formula (for users Excel 365 V2402 or newer):

    Please try:
    Please Login or Register  to view this content.

  16. #16
    Registered User
    Join Date
    01-31-2019
    Location
    Aberdeenshire,Scotland
    MS-Off Ver
    365
    Posts
    33

    Re: Extract Text and Value from Cells to total

    Many thanks Ali for your 3 replies I appreciate your help. I will have a closer look later this evening but not quite sure what you mean by 'There are items that look the same, but are not - Broccoli Green Sprouting, for instance, where one is preceede by a CHAR(10) and the other is not.'

  17. #17
    Registered User
    Join Date
    01-31-2019
    Location
    Aberdeenshire,Scotland
    MS-Off Ver
    365
    Posts
    33

    Re: Extract Text and Value from Cells to total

    Many thanks HansDouwe for your reply I appreciate your help. I will have a closer look later this evening.

  18. #18
    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 Text and Value from Cells to total

    What that means is this: I used the LEN function to check the length of the two Broccoli Green Sprouting entries - one was 24 characters and the other 25. It turned out that the first of the two had a carriage return (CHAR(10)) in front of the B. I determined this by copying and pasting values from those two entries.

    The addition of TRIM() to the formula gets rid of that leading carriage return.

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

  19. #19
    Registered User
    Join Date
    01-31-2019
    Location
    Aberdeenshire,Scotland
    MS-Off Ver
    365
    Posts
    33

    Re: Extract Text and Value from Cells to total

    Many thanks again I tried your second solution and it returns #Name? but the first works beautifully thank you I will look at the Broccoli entries to see whats going on there too..

  20. #20
    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 Text and Value from Cells to total

    Open the attachment! But you have 365, so there is nothing in the formula that should return a #NAME? error. I have ONLY added the TRIM function: twice in the first formula and once in the second.

    For Hans' solution, he told you that you'll need Excel 365 V2402 or newer (because of GROUPBY). Update your Office to the latest version and it should work.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

  21. #21
    Registered User
    Join Date
    01-31-2019
    Location
    Aberdeenshire,Scotland
    MS-Off Ver
    365
    Posts
    33

    Re: Extract Text and Value from Cells to total

    Many thanks I have marked this as solved and again appreciate your kind help

  22. #22
    Registered User
    Join Date
    01-31-2019
    Location
    Aberdeenshire,Scotland
    MS-Off Ver
    365
    Posts
    33

    Re: Extract Text and Value from Cells to total

    Ali I updated my Excel to v 2403 but Hans solution still returns #Name?...but no bother your solution is great

  23. #23
    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 Text and Value from Cells to total

    You'll need v2404 (which is still in the beta phase) for GROUPBY. If you join the BETA CHANNEL, you can get it now.

  24. #24
    Registered User
    Join Date
    01-31-2019
    Location
    Aberdeenshire,Scotland
    MS-Off Ver
    365
    Posts
    33

    Re: Extract Text and Value from Cells to total

    Ah Okay thank you!!

+ 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 text form text string( extract 5 charactors in front of all left parenthese)
    By happyexcel2021 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-30-2021, 06:05 PM
  2. [SOLVED] Compare Text in 2 Cells and Extract Uncommon Text
    By Nonoffensive Name in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-23-2020, 02:58 AM
  3. [SOLVED] extract text to cells
    By zzz444 in forum Excel General
    Replies: 6
    Last Post: 05-30-2020, 04:51 AM
  4. [SOLVED] Count total of cells containing text - from an irregular range of cells?
    By Granite in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-04-2019, 12:02 PM
  5. Compare two text cells and extract common text words
    By ghost_chip in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-28-2012, 06:07 AM
  6. Extract text from cells
    By mcp21x in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-20-2009, 02:59 AM
  7. Replies: 1
    Last Post: 02-01-2006, 12:55 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