+ Reply to Thread
Results 1 to 8 of 8

extract data from qr code and deduct from inventory list

  1. #1
    Registered User
    Join Date
    03-22-2022
    Location
    Sweden
    MS-Off Ver
    2019
    Posts
    7

    extract data from qr code and deduct from inventory list

    I have QR codes that gives me this data when scanned: {"id":"OiF9mMKP","product_order_id":"67b92426-c9cf-4c51-9737-2e574bb4342d","product_sku":"F52"}

    I Want to use the product_sku to compare with a order list and deduct the scanned product from the list.

    Aim is to scan products and match with delivery list to find any deviations.

    example file is attached.

    thanks in advance.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: extract data from qr code and deduct from inventory list

    You could use this to extract the product_sku, e.g. "F52" in your example:

    =MID(A3,FIND("product_sku",A3)+14,FIND(CHAR(34),A3,FIND("product_sku",A3)+14)-(FIND("product_sku",A3)+14))

    I'm not sure how you want to "deduct" it from the list. If you want to change the list this would need VBA. If you want to check whether it is in the list then this can be done, but I'm not clear what you want to do with it. e.g. this will give you the position of F52 in your list:

    =MATCH("F52",LEFT(A9:A40,3),0)

  3. #3
    Valued Forum Contributor
    Join Date
    01-07-2022
    Location
    Europe
    MS-Off Ver
    Office 365
    Posts
    473

    Re: extract data from qr code and deduct from inventory list

    Nick, you beat me to it with how to extract the SKU. I was going for a similar formula with
    =SUBSTITUTE( MID(A3, FIND("product_sku",A3)+14,999), CHAR(34)&"}", "")

    I assume the OP means 'deduce' rather than 'deduct'? If so, to lookup the data, you can use a formula like this. (Adjust the range accordingly, it assumes that the SKU value is extracted into cell A4)

    =INDEX(A9:A40,MATCH(A4&"*",A9:A40,0))
    <<< If you have valued anyone's contributions in this thread, please click * to thank them for their efforts

  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 2406
    Posts
    44,662

    Re: extract data from qr code and deduct from inventory list

    A wild guess... as no clue was given regarding the expected results:

    =B9-(--ISNUMBER(SEARCH(FILTERXML("<A><B>"&SUBSTITUTE($A$3,CHAR(34),"</B><B>")&"</B></A>","//B[last()-1]"),A9)))
    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

  5. #5
    Valued Forum Contributor
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Office 365
    Posts
    988

    Re: extract data from qr code and deduct from inventory list

    @AskMeAboutExcel

    I thought of something like that for extracting the SKU, but was trying to make it work even if product_sku wasn't the last parameter. Although it is in the specific example.

  6. #6
    Registered User
    Join Date
    03-22-2022
    Location
    Sweden
    MS-Off Ver
    2019
    Posts
    7

    Re: extract data from qr code and deduct from inventory list

    Thanks for all the replies and willingness to help.
    The formula for extracting the sku worked great.

    I want to scan all recieved products and have them compared to a delivery list. Every time a product is scanned it should substract from the corresponding product row.

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: extract data from qr code and deduct from inventory list

    If you want Excel to "remember" the number of times a formula has produced a result of "F52" or whatever... you will need VBA. It can not be done using a formula.

  8. #8
    Registered User
    Join Date
    03-22-2022
    Location
    Sweden
    MS-Off Ver
    2019
    Posts
    7
    Quote Originally Posted by Glenn Kennedy View Post
    If you want Excel to "remember" the number of times a formula has produced a result of "F52" or whatever... you will need VBA. It can not be done using a formula.
    Thank you. VBA is new to me so will dig in and learn about it.

+ 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. Deduct sales from a stock inventory
    By Atish304 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-23-2019, 06:11 AM
  2. Deduct sales quantity from inventory
    By aglasier in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-01-2017, 12:39 PM
  3. [SOLVED] Code to extract Data from a list of Files
    By hammer2 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-29-2016, 04:50 AM
  4. Replies: 5
    Last Post: 04-30-2014, 05:46 PM
  5. Replies: 0
    Last Post: 04-29-2014, 01:01 PM
  6. Deduct item from inventory worksheet
    By ChalkerL in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-09-2009, 03:21 AM
  7. how do I setup invoicing to deduct from inventory?
    By Splash in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 03-17-2005, 12:06 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