Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a Sub that grabs data from sheet1 and i cant get it to grab the data
(in column K) from sheet2, even when i add Worksheet("Sheet2") as shown below...? How can I use this macro to grab the data from sheet2, not sheet1? Sub ReLargeMoves() Dim c As Range, rng As Range, lngRow As Long Set rng = Worksheets("Sheet2").Range("K2:K" & Cells(Cells.Rows.Count, "K").End(xlUp).Row) For Each c In rng If WorksheetFunction.Large(rng, 1) = c.Value Or _ WorksheetFunction.Large(rng, 2) = c.Value Or _ WorksheetFunction.Large(rng, 3) = c.Value Or _ WorksheetFunction.Small(rng, 1) = c.Value Or _ WorksheetFunction.Small(rng, 2) = c.Value Or _ WorksheetFunction.Small(rng, 3) = c.Value Then _ lngRow = lngRow + 1: Rows(c.Row).Copy Sheets("Sheet3").Range("A15").Rows(lngRow) Next End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Selecting sheet with VB | Excel Discussion (Misc queries) | |||
selecting sheet name in another workbook by variable (same sheet name) | Excel Programming | |||
Print a sheet without ever selecting the sheet | Excel Programming | |||
Selecting Last Sheet | Excel Worksheet Functions | |||
Selecting sheet | Excel Programming |