meshtore.blogg.se

Pdf print selection
Pdf print selection












pdf print selection

Worksheets(FoundSheet).Cells(StartRow + Found_RowNumber, StartColumn + 3).Value = Worksheets(SearchSheet).Cells(Data_RowNumber, 3).Value Worksheets(FoundSheet).Cells(StartRow + Found_RowNumber, StartColumn + 2).Value = Worksheets(SearchSheet).Cells(Data_RowNumber, 2).Value Worksheets(FoundSheet).Cells(StartRow + Found_RowNumber, StartColumn + 1).Value = Worksheets(SearchSheet).Cells(Data_RowNumber, 1).Value

pdf print selection

If Worksheets("Data").Cells(Data_RowNumber, 1).Value = (SearchTerm) Then 'if we found the search term in the search sheet on the row we were checking StartColumn = StartColumn - 1 'remove 1 from the requested StartColumn to get the correct offsetįor Data_RowNumber = 2 To Last_Row 'create a ForLoop for how many rows there are on the SearchSheet StartRow = StartRow - 1 'remove 1 from the requested StartRow to get the correct offset Last_Row = ActiveWorkbook.Worksheets(SearchSheet).Range("A1").End(xlDown).Row 'calculates how many rows there are on the SearchSheetįound_RowNumber = 1 'used to keep track of which row we are copying data to on the FoundSheet

PDF PRINT SELECTION CODE

Do you happened to know why?īelow is the code that I'm suing to bring the data from the "data" sheet to sheet2 With that said, If I filter the "data sheet" by, let's say ABB, then everything works. Before using the code you helped me with, I was getting 198 rows but when I use your code I only get 16 rows. I have another code that brings data from another tab (data sheet) to the sheet (sheet2) that I'm printing using the code you helped me. This codes takes away all the blanks and/or active sheet after the data but now I have another problem. Click to expand.Hi GWteB, thank you so much for your help.














Pdf print selection