Fill a row without overwriting existing cell data

jmichalski81

New Member
Joined
Apr 22, 2015
Messages
22
Hi -
I have a spreadsheet used for staffing with employee names in column D and the days of the year from column C through the end of the year. We have a weekly meeting and for employees that don't move to a different project, we use the fill handle to drag them across the row through the end of the following week. Some employees have pre-scheduled days off and we currently just fill across that and re-enter "off" for the day that was previously arranged to be off. Is there a way to keep certain cell values permanent so that the fill handle does not overwrite it?
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
I'm not sure about your columns/description, but if you have a bunch of cells selected and want to fill the empty cells in that selection with something, in this example, "filled", you could use this:

VBA Code:
Sub FillEmpty()

    Dim rng As Range
    Dim cll As Range

    Set rng = Selection

    For Each cll In rng.Cells
        If IsEmpty(cll) Then
            cll.Value = "filled"
        End If
    Next cll

End Sub

This leaves any non-empty cell alone, which sounds like your "keep certain cell values permanent"?
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top