Excel: Autofill Cells Based on Value in Another Cell

Excel is an incredibly powerful and versatile tool that can be used to effectively manage and analyze data. One of the most useful features of Excel is the ability to autofill cells based on the value of another cell. Autofilling cells in Excel allows users to quickly and accurately input data into a spreadsheet, making data entry and analysis easier and more efficient. Autofill cells based on the value of another cell also helps to avoid errors and ensures that data is consistent across the entire spreadsheet. This can be especially useful for large datasets that require consistent formatting or for creating calculations that rely on data from multiple sources. Autofilling cells in Excel can save time and increase accuracy when working with data.


Often you may want to autofill the cells in Excel based on the value in another cell.

This is simple to do using an IF function and the following example shows how to do so.

Example: How to Autofill Cells Based on Value in Another Cell in Excel

Suppose we have the following column in Excel that shows the position of various basketball players:

Now suppose we would like to autofill the values in column B to contain “Yes” if the value in column A is “Guard” or “No” if the value in column A is any other value.

We can type the following formula into cell B2 to do so:

=IF(A2="Guard", "Yes", "")

We can then click and drag this formula down to each remaining cell in column B:

Excel autofill cell based on value in another cell

Each value in column B is autofilled based on the corresponding value in column A.

For example:

  • Cell A2 contains “Guard” so cell B2 is filled with “Yes”
  • Cell A3 contains “Guard” so cell B3 is filled with “Yes”
  • Cell A4 does not contain “Guard” so cell B4 is left empty

And so on.

Note that we could also create a more complex rule for autofilling if we’d like.

For example, we could type the following formula into cell B2 to autofill “Yes” if the value in cell A2 is Guard or Forward:

=IF(OR(A2="Guard",A2="Forward"),"Yes","")

Column B now displays “Yes” if the corresponding cell in column A is equal to Guard or Forward, otherwise it is left blank.

In conclusion, autofilling cells in Excel based on the value in another cell is a simple process that can be done using an IF function. This tutorial provided an example of how to do so, as well as how to create a more complex rule for autofilling cells. With this knowledge, you can now easily autofill cells based on values in other cells in Excel.

x