The sample dataset contains the Department and Joining Month of some employees in the range B4:D10.
In the empty cells, we need to copy the above cell.
Method 1 – Using Keyboard Shortcut
Press Ctrl + Shift + “ (quote) keys together. For example to copy the value of Cell C5 into Cell C6, select Cell C6 > press Ctrl + Shift + “ (quote) keys.
You can also press the right Ctrl + D to copy the above cell but it will also copy the cell formatting.
Method 2 – Using Go To Special Feature
- Select the range where you want to copy the above cells. Here, we have selected the range C5:D10.
- Press Ctrl + G to open the Go To box > select Special.
- Select Blanks from the Go To Special box > OK.
Excel will select the blank cells. - Enter the following formula in the first blank cell of the selected range, =C5 in Cell C6.
- Press Ctrl + Enter to get values in all blank cells.
- The empty cells will contain formulas. To change them to values, select the range C5:D10 and press Ctrl + C to copy them.
- Select Cell C5 and go to the Home tab > Paste option > Paste Values.
The formulas will be removed and Excel will store the values only.
Method 3 – Using VBA Code
- Select the relevant range.
- Go to the Developer tab > Visual Basic.
- In the Visual Basic window, select Insert >> Module.
- Copy the code below and paste it into the Module window:
Sub Copy_Cell_Above() Dim i As Range For Each i In Selection.Cells If i.Value = "" Then i.FillDown End If Next i End Sub
- Press Ctrl + S to save the code.
- Go to the Developer tab > Macros.
- In the Macro window, select the desired code and Run it.
- The code will copy the above cells into the blank cells.
Read More: How to Copy Multiple Cells to Another Sheet in Excel
Download Practice Workbook
You can download the practice workbook from here.
Frequently Asked Questions
What is the difference between copying the value and copying the formula from the cell above?
Copying the value duplicates the static content while copying the formula replicates the dynamic calculation or operation from the cell above.
How can I copy the visible cell above when working with filtered data in Excel?
Select the target cell, press Ctrl + Shift + Up Arrow to navigate to the visible cell above, and then use Ctrl + D to copy its content.
Related Articles
- If Value Exists in Column Then Copy Another Cell in Excel
- How to Copy Cell If Condition Is Met in Excel
- How to Copy Merged and Filtered Cells in Excel
- How to Copy Only Highlighted Cells in Excel
- How to Copy and Paste Multiple Cells in Excel
<< Go Back to Copy a Cell | Copy Paste in Excel | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!