You can achieve this in Excel using the IF
function. Here’s how you can do it:
-
Select the cell where you want the result to appear (let’s say D1).
-
Enter the following formula:
=IF(C1<>"", C1, "NONE")
-
Press Enter.
-
Drag the fill handle (a small square at the bottom-right corner of the cell) down to apply the formula to other cells in column D.
This formula checks if the cell in column C is not empty (C1<>""
). If it’s not empty, it keeps the value from column C. If it is empty, it sets the value to “NONE”.
Would you like more help with Excel functions or any other feature?
Yes, there is a shortcut to quickly apply the function to all records in Excel. You can use the following steps:
-
Enter the formula in the first cell of the column where you want the results to appear (e.g., D1):
=IF(C1<>"", C1, "NONE")
-
Select the cell with the formula (D1).
-
Press
Ctrl + Shift + Down Arrow
to select all the cells in the column from D1 to the last cell with data in column C. -
Press
Ctrl + D
to fill the formula down the entire selected range.
This method quickly applies the formula to all records in the column without having to drag the fill handle manually.
Would you like any more tips or help with another Excel feature?
标签:function,1053,column,Excel,cell,formula,apply,C1 From: https://www.cnblogs.com/alex-bn-lee/p/18394274