title: MS Excel Auto-Fill Formula
body: <p>I am trying to build some analysis on MS Excel and I needed some help trying to pull a formula horizontally and vertically. I have the following datasheet in excel <strong>Sheet1</strong> -
  <a href="https://i.stack.imgur.com/Ry8ps.png" rel="nofollow noreferrer">Product Sales Across Regions</a></p>
  
  <p>Now, I need to build a sheet that calculates the count of each product with each customer (<strong>Sheet2</strong> - <a href="https://i.stack.imgur.com/3SexG.png" rel="nofollow noreferrer">image</a>). There are approximately 100 Products (Columns) and 5000 Customers (Rows). I am using the formula <code>=COUNTIF($B2,Sheet1!$B$1)</code> for the field <code>Sheet2!C2</code>. </p>
  
  <p><em>Question:</em>
  How do I drag the formula horizontally so that it will check for <em>Product 2, Product 3 ..... Product n</em>, while also be able to drag the forumla vertically to increment the first argument in <code>=COUNTIF($B2,Sheet1!B1)</code> to <code>B3</code>, <code>B4</code>... <code>Bn</code>. I want the formula to NOT increment the second argument when I drag it Vertically. </p>