title: loop through rows and columns to meet criteria
body: <p>I would be very greatful if someone could help me with this issue...</p>
  
  <p>I would like to have a excel macro which would go through first row and first column of the sheet2 to return the value if booth conditions are met in cell b3 in sheet1.
  Conditions would be specified on sheet1; cell b1 would contain condition by which rows in sheet2 should be searched and cell b2 would contain condition by which columns in sheet2 should be searched. Result should be copied in cell b3 in sheet1.</p>
  
  <p>Thanks in advance</p>
  
  <p>Addition..............</p>
  
  <p>I have this sub which goes through rows and looks for condition 1 (strDate) but I only managed to do this is column is fixed. I should add one more counter which would go through columns to meet condition 2 (strProduct) but I don</p>
  
  <pre><code>   Sub LookUpValuesRCC2()
  '
  Dim shtData     As Worksheet    ' Sheet containing data 
  Dim shtOutput   As Worksheet    ' Output Sheet 
  Dim strDate     As String       ' Date - condition 1
  Dim strProduct  As String       ' Product - condition 2   
  Dim i           As Integer      ' Counter in shtData Sheet
  Dim j           As Integer      ' Counter in shtOutput Sheet
  '
  Set shtData = Worksheets("sheet2")
  Set shtOutput = Worksheets("sheet1")
  '
  ' Loop through "Data" Sheet Rows
  For i = 1 To 1000
  
      strDate = shtData.Cells(i, 1)
      '
      ' Loop through dates in "Output" Sheet
      ' if date match then vrite values
      For j = 1 To shtOutput.Cells(Rows.Count, 14).End(xlUp).Row
          If shtOutput.Cells(j, 14) = strDate Then
              shtOutput.Cells(j, 2) = shtData.Cells(i, 18)
  
          End If
      Next j
  Next i
  
  End Sub
  </code></pre>