Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I use this one code to find an item with six different criteria, is
there a better way to find an item with multiple criteria? Sub Button1_Click() Sheets("Sheet2").Range("G:G").ClearContents Application.ScreenUpdating = False Sheets("Sheet1").Range("A1").Select Do Until ActiveCell.Value = "" If ActiveCell.Value = Worksheets("Sheet2").Range("A1") Then If ActiveCell.Offset(0, 1).Value = Worksheets("Sheet2").Range("B2") Then If ActiveCell.Offset(0, 2).Value = Worksheets("Sheet2").Range("C2") Then If ActiveCell.Offset(0, 3).Value = Worksheets("Sheet2").Range("D2") Then If ActiveCell.Offset(0, 4).Value = Worksheets("Sheet2").Range("E2") Then If ActiveCell.Offset(0, 5).Value = Worksheets("Sheet2").Range("F2") Then Sheets("Sheet2").Range("G6000").End(xlUp).Offset(1 , 0) = ActiveCell.Offset(0, 6) End If End If End If End If End If End If ActiveCell.Offset(1, 0).Select Loop End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro: Find and replace | Excel Discussion (Misc queries) | |||
formula to find the filter criteria | Excel Worksheet Functions | |||
Find dates in a range; then sum values in that range by a criteria | Excel Discussion (Misc queries) | |||
Trying to find a max value with criteria | Excel Worksheet Functions | |||
Excel has a "Find Next" command but no "Find Previous" command. | Excel Discussion (Misc queries) |