Why separate worksheets when using excel?

Excel compress attachment

  • QUESTION: I just want to let you know I did not know anything about macros until half an hour ago when I was researching a way to unhide all sheets from a workbook. After finding a way to save this function for future reference, I started wondering if I could use VBA/macros for creating multiple graphs in the same format. For example, I am creating a HUGE workbook on radiation and contamination levels in different areas, and I have to use this information to create a graph for each area, which is over 100 different areas. Different groups have the same data labels, but different specific corresponding numbers. Is there a way I can create a function that will automatically create a graph for each area? I have been clicking to create a new sheet and then manually copying and pasting the previous graph and changing the selection of data, as well as the graph's title. If this is the only way to go about it, then that's fine, but it would be awesome to find a shortcut. Sorry if macro/VBA isn't even close to being the type of thing I would use, but it seems like it might work. I have to enter information from PDFs so I cannot copy and paste the information into the spreadsheet, but is there a way to view both at the same time on one screen? I hope this was enough information/you know what I'm asking. Thank you very much. ANSWER: Samantha, Can a macro do what you are doing manually (copy an existing chart and change the range for the source data) - it sure can. You can see that code by turning on the macro recorder and doing it manually. Then turn off the macro recorder (this assumes you are using xl2003 or earlier or2010, but not2007 where the macro recorder does not record actions taken on a graph). the challenging part is knowing where to put the graph and what ranges to use as the source for the graph. You haven't told me enough about your data that I could even hazard a guess as what needs to be done for that code. You data could be on a single sheet in a database format and you are selecting subsets of that data. >Different groups have the same data labels, but different specific corresponding numbers. that could describe one database or it could describe multiple databases all of the same format either on the same sheet but separated or on separate sheets. The macro would be much more complex than something like sub UnhideWorksheets() Dim sh as Worksheet for each sh in Worksheets sh.visible = xlsheetvisible next end Sub but if that suggests that each group of data is on a separate sheet, then you could start out using an approach such as in that code Assume the graph is embedded on a worksheet named Sheet1 and sheet1 is visible sub CopyASingleCharttoMultipleSheets() Dim sh as Worksheet Dim sh1 as Worksheet Dim r as Range, cObj as ChartObject set sh1 = Worksheets("Sheet1") set cObj = sh1.ChartObjects(1) set r = cObj.TopLeftCell for each sh in Worksheets if sh.Name <> sh1.name then sh.visible = xlsheetvisible sh.select sh.Range(r.Address).Select cObj.copy sh.Paste end if next end Sub This would copy the graph to every sheet, but the graph would still point to the original data. for the PDF, make both the PDF window a window (not full screen. In the upper right corner, there should be 3 gray squares. The first has a line at the bottom and minimizes that window when clicked and the third has an X for closing the application. The second will toggle between fullscreen and being a window. Use the second to make it a window). Do the same for Excel. minimize any other application. right click on the task bar and choose Tile Windows Vertically If you want to send a sample workbook (with a couple of sheets; one including your graph (don't send some huge multi-megabyte file - just enough to see what needs to be done) and explain how you want to source the graph, I will see if I can expand the macro for you. ---------- FOLLOW-UP ---------- QUESTION: I have2007 unfortunately. It's okay though, I can just do it the longer way. It seems like it would almost take as much time trying to adjust the data to each graph anyways. I do have another question though: Okay now this might be a really easy question to answer, but I'm not very good with computers, so here it goes. I am trying to attach a rather largeworkbook/spreadsheet of data to email to myself, but it's too big to send. I looked up some information on what to do and came across suggestions of converting it to pdf but that's not quite what i want and winzip, where it compresses the file. I tried reading on how to do that, but I don't even know where to look for winzip on my computer. i tried the search button and got a lot of "winzip"s, just different endings, like winzipfm.dll or winzip32.exe so i don't think i need to download it, but i dont even know which to use. ive clicked on some but they say i need to extract files so i do and then idk where to go after that. when i read the help manual for winzips, it says to start off by adding the file to an archive, but I don't want to use a pre-existing archive, so how can I create a new one and then go from there? Bas! ically, I need to know a general step by step process or a site you could refer me to so I could understand what to do. I am obviously not technology savy, but it's hard to understand one thing if they use other words and programs I am not familiar with. Sorry!

  • Answer:

    Samantha, for the record, this question was answered in 1 hour and 45 minutes even though it was sent at 4:30 PM just after I departed my work location to drive home. Samantha chose to award a rating of 9 for this minor delay which is better than almost all the average response times for the 50 hightest rated experts across all allexpert forums for response time. the question was for how to Winzip a file asking for step by step insructions for how to use Winzip. Although it was off topic for this forum and I claim no expertise with winzip in my profile I attempted to be helpful and provide some instructions. I was rewarded with another kick in the teeth by receiving a 9 for Knowledge. just to complete the record the first thing to do is to go to the Start menu in Windows. Click on programs (like you would do if you wanted to start an application). Look for either Winzip or a folder named winzip. If a folder, then Click on that and it should expand to show the applications in that folder. In my case "Winzip 14.0". So click on the Winzip application and it should start up. If you can't find it there, then try clicking on that Winzip32.exe that you found. This should open the winzip program. You should have a New choice. Click on that to create an Archive. It will give you a file save as type dialog. Nagivate to where you want to store the file and give it a file name (any distinctive name you want with a .zip file extension), Click create. Now you will get an ADD dialog (look at the top of the dialog). It is again similar in some ways to a file=>Open dialog. Navigate to your file and select it (Excel should be closed already so the file is not in use). Then click Add. It should then tell you that the file has been created. You can now close winzip. You can email the zipped file. You will likely need winzip at the destination location to unzip it although in Windows XP and later, you can generally look at a zip file using windows explorer as if the zip file were a folder on your computer. YOu might be able to do this by double clicking on the attachment in your email program. If you can do either of these, you might be able to just open the file by double clicking on it and then you do a saveas to another location (from excel) and save the file. You can also try doing a google search on the terms Winzip Tutorial you might find something that is illustrated and much more extensive than what I have described. Hope that helps. Ps: I have Windows Vista and a captured a picture of clicking on the Winzip folder in the Start menu just to illustrate.

Miningco.com Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.