You are on page 1of 8

How To Paste Values To Visible/Filtered Cells Only In Excel?

In Excel, if you have filtered data or hidden some cells, and when you paste values into the filtered or hidden range, the hidden cells will be also filled with pasted values. Here I will tell you some tricks to paste values to visible cells only in Excel.

Paste values to visible cells with VBA

Paste values to visible cells with Paste to Visible Range of Kutools for Excel

<a href= (https://www.extendoffice.com) Office Tips & Tricks (/documents.html) Tips & Tricks for Excel (/documents/excel.html) Tips & Tricks for Word (/documents/word.html) Tips & Tricks for Outlook (/documents/outlook.html)        How To Paste Values To Visible/Filtered Cells Only In Excel? In Excel, if you have filtered data or hidden some cells, and when you paste values into the filtered or hidden range, the hidden cells will be also filled with pasted values. Here I will tell you some tricks to paste values to visible cells only in Excel. Paste values to visible cells with VBA Paste values to visible cells with Paste to Visible Range of Kutools for Excel  (/product/office-tab.html) Amazing! Using Tabs In Excel Like Firefox, Chrome, Internet Explore  Paste Values To Visible Cells With VBA In Excel, there is no other ways to solve this problem except VBA. 1. Press Alt + F11 keys simultaneously, and a Microsoft Visual Basic for Applications window pops. 2. Click Insert > Module , then paste below VBA code to the popping Module window. VBA: Paste values to visible cells only. " id="pdf-obj-0-53" src="pdf-obj-0-53.jpg">

(/product/office-tab.html) Amazing! Using Tabs In Excel Like Firefox, Chrome, Internet Explore
(/product/office-tab.html)
Amazing! Using Tabs In Excel Like Firefox, Chrome, Internet Explore

Paste Values To Visible Cells With VBA

In Excel, there is no other ways to solve this problem except VBA.

  • 1. Press Alt + F11 keys simultaneously, and a Microsoft Visual Basic for Applications window pops.

  • 2. Click Insert > Module, then paste below VBA code to the popping Module window.

VBA: Paste values to visible cells only.

Sub CopyFilteredCells()

'Updateby20150203

Dim rng1 As Range Dim rng2 As Range

Dim InputRng As Range Dim OutRng As Range

xTitleId

= "KutoolsforExcel"

Set InputRng = Application.Selection Set InputRng = Application.InputBox("Copy Range :", xTitleId, InputRng.Address, Type: = 8)

Set OutRng

= Application.InputBox("Paste Range:", xTitleId, Type: = 8)

For Each rng1 In InputRng

rng1.Copy

For Each rng2 In OutRng If rng2.EntireRow.RowHeight > 0 Then

rng2.PasteSpecial

Set OutRng = rng2.Offset(1).Resize(OutRng.Rows.Count) Exit For End If

Next

Next Application.CutCopyMode = False End Sub

  • 3. Click F5 key or the Run button, then a dialog is popping out for you to select values to copy. See

screenshot:

Sub CopyFilteredCells() 'Updateby20150203 Dim rng1 As Range Dim rng2 As Range Dim InputRng As Range Dim
  • 4. After selecting values, click OK, then another dialog pops out to select a range to paste the selected data.

See screenshot:

Sub CopyFilteredCells() 'Updateby20150203 Dim rng1 As Range Dim rng2 As Range Dim InputRng As Range Dim
  • 5. Click OK. You can see only the visible cells are pasted the selected values.

Actually, if you use Paste to Visible Range utility of Kutools for Excel – a handy Excel tool, you can quickly and easily solve the problem of pasting values to visible range.

Actually, if you use Paste to Visible Range utility of Kutools for Excel – a handy(/product/kutools-for-excel.html) Kutools for Excel , (/product/kutools-for-excel.html) with more than 120 handy functions, makes your jobs easier. Go to Download Free Trial 60 days (https://d2d42mpnbqmzj3.cloudfront.net/downloads/KutoolsforExcelSetup.exe) After installing Kutools for Excel, please do as below:( Free Download Kutools for Excel Now!) (https://d2d42mpnbqmzj3.cloudfront.net/downloads/KutoolsforExcelSetup.exe) 1. Select a range of values you want to copy and paste, then click Kutools > Range > Paste to Visible Range > All / Only Paste Values . See screenshot: " id="pdf-obj-2-8" src="pdf-obj-2-8.jpg">

1. Select a range of values you want to copy and paste, then click Kutools > Range > Paste to Visible Range > All/Only Paste Values. See screenshot:

Actually, if you use Paste to Visible Range utility of Kutools for Excel – a handy(/product/kutools-for-excel.html) Kutools for Excel , (/product/kutools-for-excel.html) with more than 120 handy functions, makes your jobs easier. Go to Download Free Trial 60 days (https://d2d42mpnbqmzj3.cloudfront.net/downloads/KutoolsforExcelSetup.exe) After installing Kutools for Excel, please do as below:( Free Download Kutools for Excel Now!) (https://d2d42mpnbqmzj3.cloudfront.net/downloads/KutoolsforExcelSetup.exe) 1. Select a range of values you want to copy and paste, then click Kutools > Range > Paste to Visible Range > All / Only Paste Values . See screenshot: " id="pdf-obj-2-41" src="pdf-obj-2-41.jpg">

2.

Then a Paste to Visible Range dialog pops out, and select the range you want to paste the values. See

screenshot:

2. Then a Paste to Visible Range dialog pops out, and select the range you wantClick here for more detail information about Paste to Visible Range utility. (/product/kutools-for-excel/excel- paste-data-in-visible-cells-only) Tip. If you want to have a free trial of the Paste to Visible Range function, please go to free download (https://d2d42mpnbqmzj3.cloudfront.net/downloads/KutoolsforExcelSetup.exe) the Kutools for Excel firs t, and then go to apply the operation according above steps.  Paste To Visible Cells Only " id="pdf-obj-3-11" src="pdf-obj-3-11.jpg">
  • 3. Click OK. Now the selected values are pasted into the visible range only.

Paste only values to visible cells

Paste all to visible cells

2. Then a Paste to Visible Range dialog pops out, and select the range you wantClick here for more detail information about Paste to Visible Range utility. (/product/kutools-for-excel/excel- paste-data-in-visible-cells-only) Tip. If you want to have a free trial of the Paste to Visible Range function, please go to free download (https://d2d42mpnbqmzj3.cloudfront.net/downloads/KutoolsforExcelSetup.exe) the Kutools for Excel firs t, and then go to apply the operation according above steps.  Paste To Visible Cells Only " id="pdf-obj-3-21" src="pdf-obj-3-21.jpg">
2. Then a Paste to Visible Range dialog pops out, and select the range you wantClick here for more detail information about Paste to Visible Range utility. (/product/kutools-for-excel/excel- paste-data-in-visible-cells-only) Tip. If you want to have a free trial of the Paste to Visible Range function, please go to free download (https://d2d42mpnbqmzj3.cloudfront.net/downloads/KutoolsforExcelSetup.exe) the Kutools for Excel firs t, and then go to apply the operation according above steps.  Paste To Visible Cells Only " id="pdf-obj-3-23" src="pdf-obj-3-23.jpg">

Note: This utility both work on hidden and filtered rows or columns

Paste To Visible Cells Only

  • Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.

  • Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!

  • 200 New Features for Excel, Make Excel Much Easy and Powerful:

    • Merge Cell/Rows/Columns without Losing Data.

    • Combine and Consolidate Multiple Sheets and Workbooks.

    • Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.

    • Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,

    • More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools...

<a href=Office Tab (/Product/Office-Tab.Html) Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer. Kutools For Excel (/Product/Kutools-For-Excel.Html) Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day! 200 New Features for Excel, Make Excel Much Easy and Powerful: Merge Cell/Rows/Columns without Losing Data. Combine and Consolidate Multiple Sheets and Workbooks. Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion. Count by Colors, Paging Subtotals, Advanced Sort and Super Filter, More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools... (/product/kutools-for-excel.html) (/product/kutools-for-excel.html) (/download/kutools-for-excel.html) (/order/kutools-for- excel.html) " id="pdf-obj-5-30" src="pdf-obj-5-30.jpg">
<a href=Office Tab (/Product/Office-Tab.Html) Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer. Kutools For Excel (/Product/Kutools-For-Excel.Html) Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day! 200 New Features for Excel, Make Excel Much Easy and Powerful: Merge Cell/Rows/Columns without Losing Data. Combine and Consolidate Multiple Sheets and Workbooks. Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion. Count by Colors, Paging Subtotals, Advanced Sort and Super Filter, More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools... (/product/kutools-for-excel.html) (/product/kutools-for-excel.html) (/download/kutools-for-excel.html) (/order/kutools-for- excel.html) " id="pdf-obj-5-34" src="pdf-obj-5-34.jpg">
<a href=Office Tab (/Product/Office-Tab.Html) Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer. Kutools For Excel (/Product/Kutools-For-Excel.Html) Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day! 200 New Features for Excel, Make Excel Much Easy and Powerful: Merge Cell/Rows/Columns without Losing Data. Combine and Consolidate Multiple Sheets and Workbooks. Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion. Count by Colors, Paging Subtotals, Advanced Sort and Super Filter, More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools... (/product/kutools-for-excel.html) (/product/kutools-for-excel.html) (/download/kutools-for-excel.html) (/order/kutools-for- excel.html) " id="pdf-obj-5-38" src="pdf-obj-5-38.jpg">
  • Say something here ...

PEOPLE IN CONVERSATION:

19 Comments <a href=RSS (/component/jlexcomment/?view=items&com_name=content&com_key=2617&format=feed) Login Say something here ... PEOPLE IN CONVERSATION: Sort by Newest b Rachel This worked perfectly, thanks! 3 months ago Reply Share Christine You can also easily do this without a plugin .... CTRL+C the cells you want to paste Highlight the filtered/partially hidden range you're pasting to CTRL+G Select "Special" Select "Visible Cells Only" & hit OK CTRL+V 3 months ago Reply Share Sunny Thansk for you reply, but it does not work. With your method, it paste all cells including hidden ones with the copied values. 3 months ago Reply Share Mark VBA method did not work! It copied the invisible cells into the visible cells. Now, I realize that the title doesn't say "How to paste values FROM VISIBLE/FILTERED CELLS to visible/filtered cells only in Excel?" but if my workbook is filtered, 4 months ago it's highly possible that this is what is needed. If this is what you want - copy from one section to another (or to simply paste values from certain cells right back to the same cells, so to remove the fomulas) you first need to copy/paste values to an unfiltered workbook/worksheet. THEN you can use the macro data and UNDO does not work .... ... or at least I hope you can. I didn't save my Reply Share Sunny · 4 months ago I am sorry for that. Reply Share C&P · 2 months ago So is there any update version for this situation? Reply Share Radosław Hagno 7 months ago It is even more flexible and functional if the inner loop is constructed with Do While loop. " id="pdf-obj-6-17" src="pdf-obj-6-17.jpg">

Sort by Newest b

  • Rachel
    This worked perfectly, thanks!

·

3 months ago

Reply

Share

  • Christine
    You can also easily do this without a plugin .... CTRL+C the cells you want to paste Highlight the filtered/partially hidden range you're pasting to CTRL+G Select "Special" Select "Visible Cells Only" & hit OK CTRL+V

·

3 months ago

Reply

Share

  • Sunny
    Thansk for you reply, but it does not work. With your method, it paste all cells including hidden ones with the copied values.

·

3 months ago

Reply

Share

  • Mark
    VBA method did not work! It copied the invisible cells into the visible cells. Now, I realize that the title doesn't say "How to paste values FROM VISIBLE/FILTERED CELLS to visible/filtered cells only in Excel?" but if my workbook is filtered,

·

4 months ago

it's highly possible that this is what is needed. If this is what you want - copy from one section to another (or to simply paste values from certain cells right back to the same cells, so to remove the fomulas) you first need to copy/paste

values to an unfiltered workbook/worksheet. THEN you can use the macro data and UNDO does not work ....

...

or

at least I hope you can. I didn't save my

Reply Share Sunny · 4 months ago I am sorry for that. Reply Share C&P ·
Reply
Share
Sunny
·
4 months ago
I am sorry for that.
Reply
Share
C&P
·
2 months ago
So is there any update version for this situation?

Reply

Share

  • Radosław Hagno

·

7 months ago

It is even more flexible and functional if the inner loop is constructed with Do While loop.

Reply Share Tomi 8 months ago This was very helpful. Many thanks. Reply Share <a href=1 (https://www.extendoffice.com/documents/excel/2617-excel-paste-to-visible-filtered-cells.html?page_comment=1) 2 (https://www.extendoffice.com/documents/excel/2617-excel-paste-to-visible-filtered-cells.html?page_comment=2) 3 (https://www.extendoffice.com/documents/excel/2617-excel-paste-to-visible-filtered-cells.html?page_comment=3) 4 (https://www.extendoffice.com/documents/excel/2617-excel-paste-to-visible-filtered-cells.html?page_comment=4) Home (/) Knowledge (/documents.html) Support (/support.html) Forum (/forum.html) Privacy Policy (/privacy-policy.html) About Us (/support/about-us.html) Copyright © 2009 - 2018 ExtendOffice.com | All Rights Reserved. Sitemap (/component/jmap/sitemap.html) Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. " id="pdf-obj-7-2" src="pdf-obj-7-2.jpg">

Reply

Share

Tomi

·

8 months ago

This was very helpful. Many thanks.

Copyright © 2009 - 2018 ExtendOffice.com | All Rights Reserved. Sitemap (/component/jmap/sitemap.html) Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.