+ Reply to Thread
Results 1 to 12 of 12

Putting together a print out page from information in workbook.

  1. #1
    Registered User
    Join Date
    07-09-2016
    Location
    Gold Coast, Australia
    MS-Off Ver
    MS Office 2007
    Posts
    6

    Putting together a print out page from information in workbook.

    My wife is a chef and has put together a healthy eating plan for several of her customers. They can choose from a range of foods from a spreadsheet, and these will be delivered ready for them for the coming week.

    I have a very limited knowledge of excel but I have managed to put together a spreadsheet that shows the foods available and show the calorie content. A separate box will show the total calories for that day.

    The problem I am having is that I want to collate the choices into one print out page so that it will show the day and the food chosen for that day.

    I also want to lock all the cells except for where the client selects the quantity of what they would like to order.

    I would like the print out sheet to be simple, but to show the day of the week and all the information in columns A, B, C, & D but only if they have selected that item.

    I am not very conversant with macros or VBA so I am really struggling with how to this.

    I have uploaded the workbook showing how far I have got.

    Any help would be very gratefully received.

    Thanking you in advance.
    Attached Files Attached Files
    Last edited by macleala; 07-09-2016 at 10:25 PM.

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,791

    Re: Putting together a print out page from information in workbook.

    Perhaps something like this?

    To test run macro "AddAll". As I've got no printer at the moment I've not added the print part, that you will have to do.

    Rerunning the macro will clear the "Print_sheet" before the next run starts. What is missing at the moment is a macro that loops through sheets "monday" to "friday" and clears previous orders. Probably best to do this as a "stand alone". Will do this later as I'm a bit pressed for time now.

    Alf
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    07-09-2016
    Location
    Gold Coast, Australia
    MS-Off Ver
    MS Office 2007
    Posts
    6

    Re: Putting together a print out page from information in workbook.

    Hello Alf,

    Many thanks for your prompt reply and for spending you time to help me out. I appreciate it very much.

    I am beginning to realise that what I have asked for is not that easy, but what you have sent me is exactly what I was trying to do.

    I am not sure that clients would know how to run macros, so I may have to ask them to email back their order and I can run it and send them the print copy. This way I can also clear it prior to sending it out.

    I forgot to include a space for them to put their name and address but I guess I will try and work that out on my own if I can.

    In any event, I am a lot closer to completing this than I was this morning.

    Many thanks once again and if you can find the time for the loop that would be incredible.

  4. #4
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,791

    Re: Putting together a print out page from information in workbook.

    You are welcome and thanks for feedback.

    The clearing loop could be something like this:

    Please Login or Register  to view this content.
    This macro will loop through sheets "Monday" to "Friday" and clear the order range and activating "Monday" sheet before it stops.

    As I've not tested this macro as much as I normally do, could you please do a bit of testing like ordering several dinners on the same day or whatever you can think of. As I'm going off to Gothenburg in the morning my wife has a list of things to do for me and I'm sorry to say that trouble shooting excel macros is not on that list you must do a bit of testing.

    There were some problem with the menue layout as some rows are higer than others and excel may sometimes be a bit picky about coping from one formate to another but I think i solved that.

    I forgot to include a space for them to put their name and address
    Perhaps you could add an extra page to your file where you have you customers name and address adding a bit of extra information like the season of ???? vegetables are aproaching and as we use as much homegrovn as possible we woud like to recommend ????

    Or latest reserch shows that ????? Tings that could be of interest to your customers.

    Do your costomers order for a full week every time or do they just pick some days? Since there are sum formulas in every sheet "Monday" to "Friday" macro could check A19, A33 and A66 and if all these are 0 on a specific day macro could skip this day or that particular activity i.e. if A19 was 0 on sheet "Monday" then the block "Monday Snacks" would not be copied to the "Print_sheet".



    Alf

  5. #5
    Registered User
    Join Date
    07-09-2016
    Location
    Gold Coast, Australia
    MS-Off Ver
    MS Office 2007
    Posts
    6

    Re: Putting together a print out page from information in workbook.

    Hi Alf,

    Firstly, I hope you enjoyed Gothenburg. Wife's are like that and very good at handing out lists. Mine does it all the time.

    Ok, I ran the clearing macro several times and it works. So thank you for that.

    I inserted a new page and put on the information that I required. Name, address etc.

    One thing though. When I locked all the cells, except the column the clients put the quantity in the macro doesn't run. Oh well, I can live with that but I wonder how many people will try and change the other columns now.

    To answer your question, the client is put on a weekly calorie controlled eating plan by a dietitian and so all orders for us are weekly. We cook and deliver a weeks worth of food which equates to quite a few meals every week. This is the Gold Coast and it seems like everybody is on some form of diet or other so we slotted into that market very well. Business is growing very fast and we are already looking for larger premises.

    I have sent the completed form out to about five clients to get their feedback on it and if they find it confusing or not. I will let you know how that works out.

    Once again, my sincere thanks for taking the time on this. You have helped us out enormously.

    Best regards,

    Alan.

  6. #6
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Putting together a print out page from information in workbook.

    how does one specific this?
    85 gms chicken breast fillet (Please specify if you would like Thai Style or Japanese Style)
    if i write anything but a number in column A it breaks column D
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  7. #7
    Registered User
    Join Date
    07-09-2016
    Location
    Gold Coast, Australia
    MS-Off Ver
    MS Office 2007
    Posts
    6

    Re: Putting together a print out page from information in workbook.

    Well picked up humdingaling, because I didn't even though I wrote it. I have mentioned this to my wife, (the chef) and she has told me to remove the choice of Thai or Japanese style as she will use them on alternate weeks. The clients actually like both so its all good.

  8. #8
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,791

    Re: Putting together a print out page from information in workbook.

    Hi Alan

    Did you ever read books about the fictious lawyer Rumpole written by John Mortimer? Rumpole calls his wife (when she is not around) "She Who Must Be Obeyed"

    Oh well enough of pleasantries back to work!

    In your original file sheets weekdays cells C26 and C31 should perhaps be centered see cells D26 and D31.

    Sum formula in D66 is "=SUM(D56:D65)" should that not be "=SUM(D37:D65)"?

    Since the macro uses autofilter to hide cells in column A where value is blank or zero this filtering process will not work when cells are locked. One workaround would be to let macro ask for psssword and you type it in or macro contains password to unlock cells / worksheet and macro run and at the last stage the file is locked with the password.

    Or instead of using an Excel file for your customer to fill in perhaps it would be safer to convert the excel file to a pdf file for your customer to fill in their orders and then import the pdf table back to excel?

    Don't know if I got any more idas at the moment.

    Alf

    Ps Thanks for feedback and rep

  9. #9
    Registered User
    Join Date
    07-09-2016
    Location
    Gold Coast, Australia
    MS-Off Ver
    MS Office 2007
    Posts
    6

    Re: Putting together a print out page from information in workbook.

    Hey Alf,

    I have thought about your suggestion regarding the password macro and have come up with this plan, (comments welcome )

    I will delete the print out sheet from the clients file. I can lock all the cells except where the client is required to insert quantities and other information. (Names, Addresses etc)

    The client will send the file back to my wife.

    I will then put their information in my spreadsheet and run the macro.

    I can then convert the print out sheet to a PDF and return it to the customer as well a receipt as proof of purchase.

    I think that about cracks it. What do you think?

    Mate, a million thanks for seeing this through with me. If you ever come to Australia you must come and stay with us on the Gold Coast. The fishing, beaches, scuba diving etc are superb.

    Cheers,

    Alan.

  10. #10
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,791

    Re: Putting together a print out page from information in workbook.

    Hi Alan
    First of all thank you for your kind invitation and let me say in return should you come to Stockholm / Gothenburg please get in touch and I would really like to show you the sights of these cities.

    I do like your setup idea. After deleting print out sheet you could also save the file as an xlsx (no macro) file so this could then be your client template file.

    Perhaps you should also consider a folder structure. If 100 clients are ordering food for 30 weeks/year that adds up to 3000 files so a logical folder structure should make it easy to extract information.

    Do you wish to find what your clients bought last year from “May” to “July”. Choosing the right file naming structure will make it easy to find answers like this.

    As Excel is a flexible tool it’s still “jack of all trades but a master of none” so as business expands you may need a proper database program.

    As for putting information into master sheet and run macro there are several options. The manual way takes time and is boring.

    Alternative is macro opens clients order file loops through all sheets and copies values that are pasted to the different week day sheet in master file then macro is run and “print_sheet” is saved as a pdf file.

    Or macro opens clients order file adds all weekday sheets to an array and array is copied to master file (containing only print sheet and macro). Macro starts by “unlocking” all week day sheets and then “condenses” orders to print sheet before the pdf file is created.

    Have you consider any changes to the original macro?

    I was wondering if macro should check cell D69 first on every sheet. If that value is 0 the macro should skip that day. Then macro should check cell D19, D33 and D65 before these blocks are condensed and copied to the print sheet. If any of the cell values are 0 that block should be skipped. I think that would make the receipt of purchase look more “professional”.

    Cheers

    Alf

  11. #11
    Registered User
    Join Date
    07-09-2016
    Location
    Gold Coast, Australia
    MS-Off Ver
    MS Office 2007
    Posts
    6

    Re: Putting together a print out page from information in workbook.

    Hi Alf,

    Gee mate your suggestions have really got me thinking.

    My original plan was to manually enter the clients choices into my master spreadsheet and run the macro from there and then send the print page to the client. I must admit that I never considered using a macro to carry out this procecure as it is way out of my knowledge of Excel and so it was not even a consideration.

    One aspect that I didn't consider was to condense the client order information into something my wife can make sense of, so she knows what to cook and in what quantities. Until the client base increases I think I will be doing a fair bit of the calculations manually.

    I like your suggestion of a database, although I dont think we will have a need for anything too complex as we do not have the cooking capacity for large numbers of clients. (YET!)

    Have I considered changes to the orignal macro you ask? I must admit that I haven’t as it does what I originally wanted it to do so I do not want to play with it. I am not sure I have enough knowledge to change it anyway to be honest. Would it take much changing to make it operate as per your suggestions above?

    You ask about cell D69 and should the macro check this first. It is a five day plan, and we are not interested in clients who only want to do it for a day or two, so I would say that cell will always have some content other than zero.

    I have to say that I am far happier having deleted the print page and locking the workbook, apart from where information is required.

    We also have our first ten clients, and it hasn't even started yet, so I will definitely be giving you updates on how it is going.

    Cheers,

    Alan
    Last edited by macleala; 07-13-2016 at 07:16 AM.

  12. #12
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,791

    Re: Putting together a print out page from information in workbook.

    Hi Alan

    Thanks for your most interesting and informative PM. I’m really impressed what the two of you have achieved. Will reply to that later tonight.

    A macro that loops through all pages in an “order form” copies and pastes information to relevant pages in a “Master” file is really a “piece of cake” but let’s wait a bit with that.

    condense the client order information into something my wife can make sense of, so she knows what to cook and in what quantities.
    Neither did I. Perhaps we can put this on “hold” for the time being untill we / you can decide where this information and at which stage in the process this could be captured. At the moment there is no mention of time i.e. you get an order but when should the food be delivered.

    I have to say that I am far happier having deleted the print page and locking the workbook
    So let me stop tinkering and let you start working with what you got at the moment.

    We also have our first ten clients, and it hasn't even started yet,
    Lovely I'll keep fingers crossed.

    Cheers,

    Alf

    Ps If you think it could be of use to you I could write a short (hopefully) document explaining the macro and the macro commands.

+ 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. Export specific print page to new workbook?
    By Rerock in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-06-2012, 09:52 PM
  2. Can not print a Workbook page
    By 420benz in forum Excel General
    Replies: 19
    Last Post: 05-29-2012, 09:08 AM
  3. Print Page 1 of all sheets in workbook
    By rob-bob in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 01-14-2012, 02:49 PM
  4. Can a header be applied once to a workbook & print on each page?
    By Christine Sullivan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-08-2006, 01:40 PM
  5. [SOLVED] How do I print a workbook a continuously (no page breaks)?
    By Resource Directory in forum Excel General
    Replies: 0
    Last Post: 05-27-2006, 08:40 PM
  6. Can't print, preview or email workbook page
    By betsycam in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 04-08-2005, 02:58 PM
  7. How can I print page 2 of each sheet in a workbook?
    By sflower in forum Excel General
    Replies: 1
    Last Post: 03-09-2005, 11:06 AM
  8. [SOLVED] How to print multiple worksheets in one workbook on the same page.
    By rrdiorio in forum Excel General
    Replies: 2
    Last Post: 01-06-2005, 08: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