Copy visible cells only in 365?

%3CLINGO-SUB%20id%3D%22lingo-sub-814202%22%20slang%3D%22en-US%22%3ECopy%20visible%20cells%20only%20in%20365%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-814202%22%20slang%3D%22en-US%22%3E%3CP%3EThe%20article%20says%26nbsp%3B%3CSPAN%3E%3CSTRONG%3EBy%20default%2C%20Excel%20copies%20hidden%20or%20filtered%20cells%20in%20addition%20to%20visible%20cells.%26nbsp%3B%3C%2FSTRONG%3Ebut%20when%20I%20copy%20filtered%20or%20hidden%20not%20included%20by%20default.%20Is%20there%20any%20setting%20for%20this%20in%20Excel%20365%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%22%3CSPAN%3EIf%20some%20cells%2C%20rows%2C%20or%20columns%20on%20a%20worksheet%20do%20not%20appear%2C%20you%20have%20the%20option%20of%20copying%20all%20cells%E2%80%94or%20only%20the%20visible%20cells.%20%3CSTRONG%3EBy%20default%2C%20Excel%20copies%20hidden%20or%20filtered%20cells%20in%20addition%20to%20visible%20cells.%3C%2FSTRONG%3E%20If%20this%20is%20not%20what%20you%20want%2C%20follow%20the%20steps%20in%20this%20article%20to%20copy%20visible%20cells%20only.%20For%20example%2C%20you%20can%20choose%20to%20copy%20only%20the%20summary%20data%20from%20an%20outlined%20worksheet.%22%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2Fcopy-visible-cells-only-6e3a1f01-2884-4332-b262-8b814412847e%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.office.com%2Fen-us%2Farticle%2Fcopy-visible-cells-only-6e3a1f01-2884-4332-b262-8b814412847e%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-814202%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-814512%22%20slang%3D%22en-US%22%3ERe%3A%20Copy%20visible%20cells%20only%20in%20365%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-814512%22%20slang%3D%22en-US%22%3E%3CP%3Ewe%20need%20to%20ask%20excel%20to%20ignore%20the%20hidden%20cells%20explicitly.%3C%2FP%3E%3CP%3Ethe%20following%20steps%20to%20copy%20the%20visible%20cells%20are%20given%20below%3A%3C%2FP%3E%3CP%3E1.select%20data%20as%20usual.%20But%20do%20not%20copy%20it%20yet.%3C%2FP%3E%3CP%3E2.Type%20F5%20or%20Ctrl%2BG%20which%20opens%20the%20go%20to%20special%20dialog.%3C%2FP%3E%3CP%3E3.Click%20special%20button.%20This%20provides%20options%20to%20select%26nbsp%3Bspecific%20cells%20depending%20upon%20the%20criterion%20you%20choose.%3C%2FP%3E%3CP%3E4.Choose%20visible%20cells%20only%20%26amp%3B%20click%20OK.%3C%2FP%3E%3CP%3E5.Copy%20the%20data%20now.%20Notice%20that%20only%20visible%20areas%20are%20copied.%3C%2FP%3E%3CP%3E6.Now%20when%20you%20paste%2C%20it%20will%20work%20as%20expected.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-821161%22%20slang%3D%22en-US%22%3ERe%3A%20Copy%20visible%20cells%20only%20in%20365%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-821161%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EMy%20question%20was%20since%20Filtered%20is%20taking%20care%20of%20only%20copy%20pasting%20visible%20cells%20only%20then%20why%20to%20follow%20these%20steps%3F%20But%20this%20article%20saying%20different.%20Give%20a%20try%20on%20filtered%20and%20you%20will%20see%20only%20visible%20data%20copied.%20thanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1096679%22%20slang%3D%22en-US%22%3ERe%3A%20Copy%20visible%20cells%20only%20in%20365%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1096679%22%20slang%3D%22en-US%22%3E%3CP%3EWhen%20I%20try%20to%20paste%20the%20cells%20after%20copying%20them%20in%20this%20way%20only%20part%20of%20the%20data%20will%20paste.%26nbsp%3B%20Any%20idea%20why%20I'm%20unable%20to%20copy%20and%20paste%20visible%20cells%20without%20excel%20omitting%20part%20of%20my%20data%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1096735%22%20slang%3D%22en-US%22%3ERE%3A%20Copy%20visible%20cells%20only%20in%20365%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1096735%22%20slang%3D%22en-US%22%3EHey%20MICROSOFT!%20Why%20the%20reverse-logic%3F%20Why%20wouldn't%20you%20have%20made%20the%20default%20behavior%20to%20operate%20on%20only%20visible%20cells%3F%20Then%20if%20for%20some%20bizarre%20reason%20I%20wanted%20to%20also%20work%20with%20hidden%20cells%2C%20then%20I%20could%20go%20to%20that%20Special%20place%20and%20SELECT%20HIDDEN%20CELLS.%3F%3F%20This%20counter-intuitive%20behavior%20always%20trips%20me%20up.%20I%20tell%20my%20students%20that%20for%20copies%2Fcuts%20to%20just%20sort%20instead%20of%20filter%20to%20bypass%20this%20dangerous%20behavior.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2227233%22%20slang%3D%22en-US%22%3ERe%3A%20Copy%20visible%20cells%20only%20in%20365%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2227233%22%20slang%3D%22en-US%22%3EIs%20it%20possible%20to%20put%20in%20an%20automathic%20way%20this%20process%3F%20I%20need%20to%20copy%20a%20lot%20of%20times%20the%20only%20visible%20cells%20and%20if%20evverytime%20I%20do%20have%20to%20use%20this%20procedure%20I%20will%20spend%20a%20lot%20of%20time%20(too%20much!)%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2227491%22%20slang%3D%22en-US%22%3ERe%3A%20Copy%20visible%20cells%20only%20in%20365%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2227491%22%20slang%3D%22en-US%22%3Eif%20you%20are%20pasting%20to%20a%20filtered%20data%2C%20it%20will%20omit%3CBR%20%2F%3E%3CBR%20%2F%3Ebetter%20to%20use%20fill%20in%20this%20case%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2509699%22%20slang%3D%22en-US%22%3ERe%3A%20Copy%20visible%20cells%20only%20in%20365%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2509699%22%20slang%3D%22en-US%22%3EIn%20that%20case%20you%20can%20use%20a%20Filter%20formula%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2708886%22%20slang%3D%22en-US%22%3ERe%3A%20Copy%20visible%20cells%20only%20in%20365%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2708886%22%20slang%3D%22en-US%22%3EWas%20this%20ever%20resolved%3F%20Is%20there%20still%20no%20way%20to%20copy%2Bpaste%20visible%20cells%20only%20in%20the%20web%20version%20of%20Excel%3F%3C%2FLINGO-BODY%3E
New Contributor

The article says By default, Excel copies hidden or filtered cells in addition to visible cells. but when I copy filtered or hidden not included by default. Is there any setting for this in Excel 365?

 

"If some cells, rows, or columns on a worksheet do not appear, you have the option of copying all cells—or only the visible cells. By default, Excel copies hidden or filtered cells in addition to visible cells. If this is not what you want, follow the steps in this article to copy visible cells only. For example, you can choose to copy only the summary data from an outlined worksheet."

 

https://support.office.com/en-us/article/copy-visible-cells-only-6e3a1f01-2884-4332-b262-8b814412847...

9 Replies

we need to ask excel to ignore the hidden cells explicitly.

the following steps to copy the visible cells are given below:

1.select data as usual. But do not copy it yet.

2.Type F5 or Ctrl+G which opens the go to special dialog.

3.Click special button. This provides options to select specific cells depending upon the criterion you choose.

4.Choose visible cells only & click OK.

5.Copy the data now. Notice that only visible areas are copied.

6.Now when you paste, it will work as expected.

Hi,

My question was since Filtered is taking care of only copy pasting visible cells only then why to follow these steps? But this article saying different. Give a try on filtered and you will see only visible data copied. thanks

When I try to paste the cells after copying them in this way only part of the data will paste.  Any idea why I'm unable to copy and paste visible cells without excel omitting part of my data?

Hey MICROSOFT! Why the reverse-logic? Why wouldn't you have made the default behavior to operate on only visible cells? Then if for some bizarre reason I wanted to also work with hidden cells, then I could go to that Special place and SELECT HIDDEN CELLS.?? This counter-intuitive behavior always trips me up. I tell my students that for copies/cuts to just sort instead of filter to bypass this dangerous behavior.
Is it possible to put in an automathic way this process? I need to copy a lot of times the only visible cells and if evverytime I do have to use this procedure I will spend a lot of time (too much!)
if you are pasting to a filtered data, it will omit

better to use fill in this case
In that case you can use a Filter formula
Was this ever resolved? Is there still no way to copy+paste visible cells only in the web version of Excel?

@StefanoValenza 

With this macro you can easily copy-paste values from & to visible cells only.

 

It works like this:
Run the code > an inputbox will pop up > select the range to copy > OK > another inputbox will pop up > select the range to paste (select the first cell only) > OK.

 

If you need to use it frequently, you can put the code in a code module in the "Personal.xlsb" and then assign it to a button in the toolbar menu. So you just have to click the button when you need to run it.

Sub CopyVisibleToVisible1()
'use this for:
'Copy paste(value only):
'from filtered range to filtered range
'from filtered range to unfiltered range
'from unfiltered range to filtered range
'Not work on hidden column

'How it works:
'Run the code > an inputbox will pop up > select the range to copy > OK > anoher inputbox will pop up
' > select the range to paste (select the first cell only) > OK
    
'If you need to use it frequently, you can put the code in a code module in the "Personal.xlsb" and
'then assign it to a button in the toolbar menu. So you just have to click the button when you need to run it.
    
    Dim rngA As Range
    Dim rngB As Range
    Dim r As Range
    Dim Title As String
    Dim ra As Long
    Dim rc As Long
    
    On Error GoTo skip:
    
    Title = "Copy Visible To Visible"
    Set rngA = Application.Selection
    Set rngA = Application.InputBox("Select Range to Copy then click OK:", Title, rngA.Address, Type:=8)
    
    Set rngB = Application.InputBox("Select Range to Paste (select the first cell only):", Title, Type:=8)
    Set rngB = rngB.Cells(1, 1)
    Application.ScreenUpdating = False

    ra = rngA.Rows.Count
    rc = rngA.Columns.Count
    If ra = 1 Then rngB.Resize(, rc).Value = rngA.Value: Exit Sub
    
    
    Set rngA = rngA.Cells(1, 1).Resize(ra, 1)
    
    For Each r In rngA.SpecialCells(xlCellTypeVisible)
      rngB.Resize(1, rc).Value = r.Resize(1, rc).Value
        Do
          Set rngB = rngB.Offset(1, 0)
        Loop Until rngB.EntireRow.Hidden = False
    Next
    
    Application.GoTo rngB
    Application.ScreenUpdating = True
    Application.CutCopyMode = False
    

Exit Sub
skip:
    If err.Number <> 424 Then
        MsgBox "Error found: " & err.Description
    End If
    
    Application.ScreenUpdating = True
    Application.CutCopyMode = False

End Sub