![]() Step 11: Toggle off the Design mode, and click your button. Now right click on your button, and click on "Assign Macro." choose the macro you created Step 10: Assign the Macro to your button: View->Toolbars->Form Design and click on the little pencil/triangle icon (toggle Design mode On). Find a cell you want the button to reside in (make sure it's outside of your data range!) Make a rectangle. click on the rectangle (or ellipse, I guess) and your cursor will turn into a crosshair. You should get another toolbar visible, mine popped up in the bottom of the screen. Step 9: Make a button - View->Toolbars->Drawing. If that doesn't work, you missed something. Now test the macro by Tools->Macro->Run Macro. Step 6: (Optional) if you want the button to take you automatically to your new sort (ie new sheet) then go back to where your data was outputted and click on any cell there Step 5: go back to your original sheet, and click Data->Refresh Range Step 4: Verify that your sort/filter worked, if needed go to the sheet you ouputted your data. (for filtering, go to data->filtering->autofiltering, set the criteria, and click on "More" below to copy the output elsewhere, select the range you created before for your output) Same process for sorting, or a combination of the two. Then I went through the motions to get my correct filter. So I clicked Tools->Macros->Record Macros. click on the first cell where you want the data copied. Step 2: define your output (if you want to make a copy of your original data and dump the new sorted data in another sheet, which I did) If so, create a new sheet, name it something without spaces or underscores. Select the top row, including the column headers, and hold shift and click the cell of the bottom right-most cell so you've got ALL your data selected. Since I upload my files to GDocs and view on my phone, I want the outputted data on their own sheets. I want to quickly have a specific view of my data, without having to go to data->sort and plug in the criteria each time. In my case, I have 5 columns and like 200 rows. OK, here is what I have learned, spelled out in the most basic terms, no code involved. ![]() I've found other threads talking about this, but not using the macro recorder (I am so far useless with code ) I'll repost below where I am with this. **Update: 4/9/11 - I never managed to get the above code working in my file, using the macro recorder, I am not able to get the button to launch the macro. Someone posted a great example, I'm sure I'll be back with questions related to how to make it work: I'm sure it's right in front of me, probably the simplest thing ever to do.Įdit: OK, turns out if you have a "how do I" question, check out the code snippets board. But I can't yet figure out how to assign the Macro to a cell, such that I can simply click on that cell (effectively, a button within the spreadsheet). I'm still tinkering with it, but I think I'll get that part eventually (maybe.)Īnd I found another tutorial that would allow me to add that macro to a toolbar, a keystroke, or a context menu. The first question is: I want to create a Macro (found a GUI tutorial on that here) that copies a data set to another location in the same sheet, filters it, then sorts it. I'm just wrapping my head around OO Calc, super excited about the flexibility, but pretty lost as far as HOW to get the functionality I'm looking for. I see that the house rules call for posting one question per thread.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |