How can I use Excel to automatically fill cells based on the value in another cell?

Excel is a powerful tool that allows users to easily organize and manipulate data. One of its useful features is the ability to automatically fill cells based on the value in another cell. This allows for efficient and accurate data entry, as well as quick updates to large datasets. By using formulas or special functions, users can set up specific criteria for the automatic filling of cells, saving time and reducing the risk of errors. This feature is particularly helpful for tasks such as creating lists, generating serial numbers, or populating data based on specific conditions. Overall, utilizing Excel’s automatic cell filling capability can greatly improve productivity and accuracy in data management.

Excel: Autofill Cells Based on Value in Another Cell


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.

Additional Resources

The following tutorials explain how to perform other common operations in Excel:

x