title: Two if-test conditions on Excel Sheet, using xlrd
body: <p>I'm extracting data from an Excel file using the following code: </p>
  
  <pre><code>for row in range(sheet.nrows):                      # For-loop, for all rows
                   for col in range(sheet.ncols):     # For-loop, for all columns
                      if((re.match(r'F\d-\w*',str(sheet.cell(row,col).value))) and str(sheet.cell(row+2,col).value)!=None):            # If cell starts with F(number)-(several word chars) AND if cell two rows below this is not empty
                          works2.write(num_row+1,num_col,(sheet.cell(row,col)).value)     
                          works2.write(num_row, num_col,(sheet.cell(row-2,col)).value
      ect...
  </code></pre>
  
  <p><strong>This code worked nicely until I added the second condition to the if test</strong>. I don't want the code to read in anything for columns where there is no data, i.e. the second if-test condition. Currently, however, the second if-test does nothing and I'm still reading in a few empty columns of data. Can someone help me spot my error/possibly re-phrase my second if test so that it checks if the cell 2 rows below the cell (row, col) is empty and only enters the commands under the if-test if it is not?</p>
  
  <p>Apologies for asking such a basic question. I just can't seem to get this to do what I want...  </p>