|
On Microsoft Excel Office 2003 how do I print all of the results from using CTR+F(Find a range of cells)? When you have a complete workbook and need to find a specific set of cells, you press CTR+F to search and type the name of what your looking for and press find all. A list of results are displayed with information as to where each result is and which spreadsheet it is attached to. My question is how to print only the row of the selected cell from the list of results all together. If this is to complicated I understand how you feel. Software - 2 Answers - 2006-04-24 06:43:11 Best Answer As far as I know, this cannot be done at the click of a button. You need a custom solution. It's a bit clunky, but try inserting and running this macro. You would select the area that has the data you want to look for and then run the macro. Sub PrintCertainRows() Dim C1, C2, HideRow As Boolean For Each C1 In Selection.Rows HideRow = True For Each C2 In C1.Cells If C2 = "ABC" Then HideRow = False Next C2 If HideRow Then C1.EntireRow.Hidden = True Next C1 ActiveSheet.PrintOut For Each C1 In Selection.Rows C1.EntireRow.Hidden = False Next C1 End Sub To insert the macro, press Alt-F11 and on the VB menu, go to Insert > Module, then paste the text in. You can close the VB screen after. It will be embeded into the workbook for your use now. Let's say you were looking to hide any rows that have cells containing the value "ABC". Then on any given sheet, highlight the area where you think there might be "ABC"s and run this macro by selecting it from Tools > Macro > Macros menu. (Also, when you write macros, always use indentation. This website formatting removes them so you cannot see it. Otherwise your macros are harder to read.) All Answers Answer 1 As far as I know, this cannot be done at the click of a button. You need a custom solution. It's a bit clunky, but try inserting and running this macro. You would select the area that has the data you want to look for and then run the macro. Sub PrintCertainRows() Dim C1, C2, HideRow As Boolean For Each C1 In Selection.Rows HideRow = True For Each C2 In C1.Cells If C2 = "ABC" Then HideRow = False Next C2 If HideRow Then C1.EntireRow.Hidden = True Next C1 ActiveSheet.PrintOut For Each C1 In Selection.Rows C1.EntireRow.Hidden = False Next C1 End Sub To insert the macro, press Alt-F11 and on the VB menu, go to Insert > Module, then paste the text in. You can close the VB screen after. It will be embeded into the workbook for your use now. Let's say you were looking to hide any rows that have cells containing the value "ABC". Then on any given sheet, highlight the area where you think there might be "ABC"s and run this macro by selecting it from Tools > Macro > Macros menu. (Also, when you write macros, always use indentation. This website formatting removes them so you cannot see it. Otherwise your macros are harder to read.) 2006-04-25 09:35:19 Answer 2 You can use: 1- AutoFilter 2- Custom filter 3- Some advanced cell functions (I can send it over to you) 4- Make Macro to do that. e-mail me if you are intersting, after marking me as best answer. I am the XLMan 2006-04-29 04:06:37 | Other Answers: |