title: Python Openpyxl-value of an input variable is not accessible inside for loop
body: <p>I'm new to Python. My code has to ask for a product ID (string) from the user, then find the cell in an Exel file which includes that Produt ID. Once the cell is found, the value of the next 30 columns on the same row should be read and printed.</p>
  
  <p>When the user enters product ID which is asked before the for loop, it doesn't work. However, if I enter a product ID directly in the code (a value which exists in the Excel file instead of asking the user), it works! How can I fix that ?</p>
  
  <p>'''</p>
  
  <pre><code>    import openpyxl
  
      workbook = openpyxl.load_workbook(filename="Forecast - 2020-02-06.xlsx")
  
      workbook.__iter__()
  
      sheet = workbook.active
  
      ProductID = input("Please enter a Product ID")
      #Lets say the product ID is "ABC"
  
      for row in sheet.iter_rows(min_row=1, max_row=5, min_col=1, max_col=30):
          for cell in row:
              if cell.value == ProductID:
  
      #if in the line above I type cell.value == "ABC" the rest of the code would work! 
  </code></pre>
  
  <p>Thanks</p>