There isn't an exact equivalent to the SQL select ... where
functionality in Excel, but take a look at the VLOOKUP
function. It may be what you are looking for. If that doesn't have enough functionality, you will probably have to use VBA:
Dim DataRange as Range
Dim RowNum as Integer
Dim NewRow as Integer
Dim TestMonth as Integer
Dim ThisMonth as Integer
Set DataRange = Range(Sheet1.Cells(1,1), Sheet1.Cells(100,2))
ThisMonth = Application.WorksheetFunction.Month(Application.WorksheetFunction.Today())
NewRow = 1
For RowNum from 1 to DataRange.Rows.Count
TestMonth = Application.WorksheetFunction.Month(DataRange.Cells(RowNum, 1).Value)
if TestMonth = ThisMonth Then
Sheet2.Cells(NewRow, 1).Value = DataRange.Cells(RowNum, 2).Value
NewRow = NewRow + 1
End If
Next RowNum