+ Reply to Thread
Results 1 to 30 of 30

Creating Output Script using Checkboxes

  1. #1
    Registered User
    Join Date
    06-05-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    35

    Creating Output Script using Checkboxes

    Hi,

    Not sure if this can be done in excel or if I need to create some sort of special form but....

    I am looking to create an output script based on ticking chackboxes in excel.

    The user would manually enter into a cell A3 an item code - lets call it 11111

    They then use a button, probably a checkbox to select multiple areas that they want in the output - there would be about 8 to choose from, lets say in this case the user ticks three of them, those being 'North', 'South' and 'East'.

    Finally they selct the weeknumbers they want to apply, again probably from checkboxes - in this case they select weeks '5' '6' and '7'.

    This would then produce an output on the sheet in columns A, B and C that looks like this:

    11111 North 5
    11111 South 5
    11111 East 5
    11111 North 6
    11111 South 6
    11111 East 6
    11111 North 7
    11111 South 7
    11111 East 7

    Any help, guidance would be appreciated because I am a bit lost on this one, not sure if I need to use VBA to get it to work,

    thanks for looking

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Creating Output Script using Checkboxes

    You get better help if you add a small excel file, without confidential information (on the forum).
    Please also add the expected result in your file.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    06-05-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    35

    Re: Creating Output Script using Checkboxes

    https://onedrive.live.com/redir?resi...nt=file%2cxlsx


    Hi, thanks for the feedback - attached is a link to the file - thanks for looking.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Creating Output Script using Checkboxes

    I didn't download your file.

    You can do this with formulas.

    See if you can adapt this:

    Lookup with multiple instances of the lookup value
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Creating Output Script using Checkboxes

    Not all members want or are allowed to use external links.

    You avoid that, if you add your file on this forum.

    To Attach a File:

    1. Scroll down to the window below your post Additional Options
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.

  6. #6
    Registered User
    Join Date
    06-05-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    35

    Re: Creating Output Script using Checkboxes

    Here is the attachment instead of the link, thanks again for advice. I have looked at the link you provided and I dont think it will help with my particular query.
    Attached Files Attached Files
    Last edited by TheGrinch1; 06-15-2015 at 08:29 AM.

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Creating Output Script using Checkboxes

    you did not added the imput data in your file.

    I would solve it with (the built-in function) filter.

  8. #8
    Registered User
    Join Date
    06-05-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    35

    Re: Creating Output Script using Checkboxes

    Hi,

    There is only one piece of input data in the file - cell A10 - this is where a single item code is manually inputted. The user then checks the boxes for location (north, south etc) that they need and the week numbers. After doing this I was hoping it was possible to click a macro button and produce the output. I am sorry, I am unsure how I canuse the filters to produce this effect.

  9. #9
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Creating Output Script using Checkboxes

    You can filter on the original data.

    But since you don't add them, I can't show you.

  10. #10
    Registered User
    Join Date
    06-05-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    35

    Re: Creating Output Script using Checkboxes

    Hmmmm...well thanks for trying anyway.

    There is no original data to show, it is simply a criteria selection sheet - enter an item code, select the areas and week numbers you want in the checkboxes and then the output is produced, thats the requirement anyway. I assume it cant be done, thanks for your time.

  11. #11
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,199

    Re: Creating Output Script using Checkboxes

    I have a working model which I would like to tidy up before posting. For my info, what is the likely maximum number of weeks selected?

    I'll get back to you as soon as I can.

  12. #12
    Registered User
    Join Date
    06-05-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    35

    Re: Creating Output Script using Checkboxes

    Hi,

    That sounds great - the max number of weeks would probably be 15 weeks. I hope this helps,

    Look forward to hearing from you!

  13. #13
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Creating Output Script using Checkboxes

    After looking at your file I don't want to say this can't be done with formulas but I think you'd be better off using VBA procedures.

    Let's see what JohnTopley comes up with.

  14. #14
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Creating Output Script using Checkboxes

    Duplicate post, removed content.

  15. #15
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,199

    Re: Creating Output Script using Checkboxes

    Tony,
    I f you recommend VBA than I am not one to argue. When it comes to Excel I am a mere apprentice!

    I have managed to pull together an almost complete "solution" but am stuck on one formula. I posted a thread "Assigning data dynamically" and received an answer for one formula but not the second (probably because my data was misleading).

    If posted my solution so far, would you be able to look at and see if its viable?

    Many thanks.

  16. #16
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Creating Output Script using Checkboxes

    Sure, I'll take a look.

  17. #17
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,199

    Re: Creating Output Script using Checkboxes

    Tony,


    Attached is my attempted solution. my main problem is assigning data to column F: I can't get my mind round the row relationships between rows in F and C.

    Obviously any other comments/advice you may have will be vey much appreciated.

    It's late here in UK so I'll sign off for today.

    Thanks again.
    Attached Files Attached Files

  18. #18
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,199

    Re: Creating Output Script using Checkboxes

    Hi,

    Here is an example which I hope you can work with.
    Attached Files Attached Files

  19. #19
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Creating Output Script using Checkboxes

    I had a very busy day and wasn't able to look at your file.

    I probably won't be able to get to it until tomorrow (Wed) evening.

  20. #20
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,199

    Re: Creating Output Script using Checkboxes

    Tony,

    No problem. I have posted a "working" version following my initial request and as yet have had no response from the originator of the thread so it probably isn't too urgent.

    Being retired I have time on my hands!

  21. #21
    Registered User
    Join Date
    06-05-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    35

    Re: Creating Output Script using Checkboxes

    Hi,

    JohnTopley - I am both mortified and embarassed that I did not respond sooner to your help - my phone previously alerted me when this thread received an update but for some reason this has not happened.

    What you have done is fantastic!!! Thank you so much. For some reason it seems to break down if I add more than 4 weeks into it but it is still hugely useful to me as it is. I am trying to get my head around what you have done with the formulas, I never thought to look at it this way and it seems to be the right direction. Again, thank you and my apologies.

  22. #22
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,199

    Re: Creating Output Script using Checkboxes

    Just drag down the formula in D- F : I tried 6 weeks and it was OK.

  23. #23
    Registered User
    Join Date
    06-05-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    35

    Re: Creating Output Script using Checkboxes

    Hi, you are right but if a week that is higher than week 8 is selected then column F does not populate and im not sure why.

  24. #24
    Registered User
    Join Date
    06-05-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    35

    Re: Creating Output Script using Checkboxes

    Hi - my mistake - I needed to drag the formula in C down further, seems to be working like a charm. John, I thank you for your time and help and Tony also. Many thanks.

  25. #25
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,199

    Re: Creating Output Script using Checkboxes

    This has highlighted by problem with formula in F and how it relates to regions and weeks. I'll have to have another think about this and/or hope Tony Valko ("my" guru) will resolve the issue.

  26. #26
    Registered User
    Join Date
    06-05-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    35

    Re: Creating Output Script using Checkboxes

    Many thanks - good luck Tony!

  27. #27
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,199

    Re: Creating Output Script using Checkboxes

    Forget my last post!

    Make sure you drag down all the formulae in D to F. You may have extend the ranges but I have just selected 4 regions and weeks 5 to 14 and it populates the tables.

  28. #28
    Registered User
    Join Date
    06-05-2015
    Location
    UK
    MS-Off Ver
    2013
    Posts
    35

    Re: Creating Output Script using Checkboxes

    Agreed John, this does indeed work , thank you.

    Tony - I think we can consider this a completed piece now to avoid you spending time on it.

  29. #29
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,199

    Re: Creating Output Script using Checkboxes

    Apologies about the mis-communications: the old grey matter needs a tonic. Anyway, glad it is sorted.

  30. #30
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Creating Output Script using Checkboxes

    Quote Originally Posted by TheGrinch1 View Post
    Agreed John, this does indeed work , thank you.

    Tony - I think we can consider this a completed piece now to avoid you spending time on it.
    Glad you're satisfied.

    Good work John. Here's some rep...

+ 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. VBA Script Needed to Hide Checkboxes Based on Column Values
    By adambnewman in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-04-2014, 05:16 AM
  2. VBA script to compare latest two files and get output to another file
    By arkrish in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-27-2013, 01:17 PM
  3. [SOLVED] Newb: Need help formatting a script output
    By Klark Kent in forum Excel General
    Replies: 12
    Last Post: 05-28-2013, 07:16 PM
  4. Replies: 0
    Last Post: 09-16-2012, 10:19 PM
  5. [SOLVED] weird problem with inconsistent output from VBA script
    By rducky26 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-04-2012, 02:54 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