+ Reply to Thread
Results 1 to 6 of 6

Separating $1 and $2 Coupons by Bar Code

  1. #1
    Registered User
    Join Date
    04-11-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    58

    Question Separating $1 and $2 Coupons by Bar Code

    I'm having a hard time coming up with a macro that will sort this data the way I want. We have farmers market coupon barcodes that will be for $1 and $2 food coupons. The $1 coupons will all have barcodes that fall within this range: 850001-860000. The coupons will always start with HB2016. So the $1 coupons will be HB2016580001 to HB2016860000. We have to modify our spreadsheet (example attached) that previously only tracked $2 coupons to make sure we don't give any farmer too much money back. This is what I want the macro to do:

    1. Skip the summary sheet at the front and the last two sheets ("raw data" and "vouchering database").

    2. On every other sheet/tab which will be for each farmer's coupons, there will be rows of data as on the example. When we run the macro it will check for data in B5 of each sheet and if it is there it will add a column to the right of that column and search the B column for any coupons in the HB2016580001 to HB2016860000 range, deleting them from that column and putting them in the inserted column. It will not erase any of the data in column C if it exists but rather move it over. Then it will go to the next column (the data that was in C but got moved over) and do the same thing until it hits a blank row 5 with no data in it. Then it will move on to the next farmer's worksheet stopping when it gets to the end or the raw data worksheet.

    Example data can be found here with 3 farmers. There will be up to 200 farmers on the final data though- https://drive.google.com/file/d/0BzE...ew?usp=sharing. It is possible for a farmer to have some $2 and some $1 coupons or they might just have one or the other. You can ignore the data on the summary and raw data sheets as that is not relevant to this macro but we need it for other macros we are using on this data. I am also wondering what will happen if the macro has already done some of the data and we then add additional rows. Is there a way to make it skip the rows that have already been parsed into $2 and $1 coupons based on the barcode?

    Big thanks to anyone who can help or point me in the right direction as I'm still a newbie with this stuff.

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Separating $1 and $2 Coupons by Bar Code

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Registered User
    Join Date
    04-11-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    58

    Re: Separating $1 and $2 Coupons by Bar Code

    I posted an example via google drive but I didn't know you could upload attachments. Great idea about an after attachment! I am attaching the before and after here - hopefully this will illustrate what I am talking about. Maybe there is even some easier way. I just need a way to separate these two types of coupons. I would be open to just having the $1 coupons go to the top of the existing row and getting highlighted as well.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: Separating $1 and $2 Coupons by Bar Code

    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    This thread may receive no replies until the crosspost links are provided.
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

  5. #5
    Registered User
    Join Date
    04-11-2014
    Location
    United States
    MS-Off Ver
    Excel 2013
    Posts
    58

    Re: Separating $1 and $2 Coupons by Bar Code

    Can I just delete this? I posted it elsewhere because I didn't get an answer and in my experience when no one answers within the first few days you will never get an answer. I couldn't find how to delete a post.

  6. #6
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: Separating $1 and $2 Coupons by Bar Code

    Quote Originally Posted by Mamagregory View Post
    I posted it elsewhere because I didn't get an answer and in my experience when no one answers within the first few days you will never get an answer
    From the Forum rules under Want to get your question answered quickly?

    •If your question has not been answered within a day, consider adding another post with any additional information you believe is relevant. If you think your post is good as is, just reply to your own thread with the words "Bump no response", which will bring it to the top of the forum
    .

    If you do create another post though state you have and provide a link to the new post in case someone reads the old post.
    Last edited by WasWodge; 07-23-2016 at 11:24 PM.
    If my solution worked (or not) please let me know. If your question is answered then please remember to mark it solved

    Computers are like air conditioners. They work fine until you start opening windows. ~Author Unknown

+ 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: 1
    Last Post: 01-29-2015, 02:46 AM
  2. [SOLVED] Macro to Sort Coupons by Redeemer Number
    By Mamagregory in forum Excel Programming / VBA / Macros
    Replies: 41
    Last Post: 05-02-2014, 02:07 PM
  3. separating a post code
    By Lorna B in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-29-2013, 03:45 PM
  4. Separating text and numbers from a mixed code
    By amahesh101 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-10-2010, 03:42 AM
  5. a weekly grocery list and costs, available coupons and value
    By Excellente12 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 07-24-2006, 12:20 AM
  6. Separating
    By T De Villiers in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-22-2006, 12:50 PM
  7. Calculating Bond yields on Bonds with Multiple Coupons
    By tim4682 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-08-2005, 04:56 PM

Tags for this Thread

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