Skip i'r prif gynnwys

Sut i gludo gwerthoedd i gelloedd gweladwy / hidlo yn Excel yn unig?

Yn Excel, os ydych chi wedi hidlo data neu guddio rhai celloedd, a phan fyddwch chi'n pastio gwerthoedd i'r ystod hidlo neu gudd, bydd y celloedd cudd hefyd yn cael eu llenwi â gwerthoedd wedi'u pastio. Yma, dywedaf wrthych rai triciau i gludo gwerthoedd i gelloedd gweladwy yn Excel yn unig.

Gludo gwerthoedd i gelloedd gweladwy gyda VBA

Gludo gwerthoedd i gelloedd gweladwy gyda Gludo i Ystod Gweladwy o Kutools ar gyfer Excel syniad da3


Gludo gwerthoedd i gelloedd gweladwy gyda VBA

Yn Excel, nid oes unrhyw ffyrdd eraill o ddatrys y broblem hon ac eithrio VBA.

1. Gwasgwch Alt + F11 allweddi ar yr un pryd, ac a Microsoft Visual Basic ar gyfer Ceisiadau pops ffenestri.

2. Cliciwch Mewnosod > Modiwlau, yna pastiwch islaw cod VBA i ffenestr y Modiwl popio.

VBA: Gludo gwerthoedd i gelloedd gweladwy yn unig.

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. Cliciwch F5 allwedd neu'r Run botwm, yna mae deialog yn popio allan i chi ddewis gwerthoedd i'w copïo. Gweler y screenshot:
doc-past-i-weladwy-cell-1

4. Ar ôl dewis gwerthoedd, cliciwch OK, yna mae deialog arall yn galw allan i ddewis ystod i gludo'r data a ddewiswyd. Gweler y screenshot:
doc-past-i-weladwy-cell-2

5. Cliciwch OK. Gallwch weld mai dim ond y celloedd gweladwy sy'n cael eu pastio'r gwerthoedd a ddewiswyd.


Gludo gwerthoedd i gelloedd gweladwy gyda Gludo i Ystod Gweladwy o Kutools ar gyfer Excel

A dweud y gwir, os ydych chi'n defnyddio Gludo i'r Ystod Weladwy cyfleustodau Kutools ar gyfer Excel - offeryn Excel defnyddiol, gallwch ddatrys problem pastio gwerthoedd i ystod weladwy yn gyflym ac yn hawdd.
past doc cell weladwy 6

Kutools ar gyfer Excel, gyda mwy na 300 swyddogaethau defnyddiol, yn gwneud eich swyddi yn haws. 

Ar ôl gosod Kutools ar gyfer Excel, gwnewch fel isod:(Lawrlwythiad Am Ddim Kutools ar gyfer Excel Nawr!)

1. Dewiswch ystod o werthoedd rydych chi am eu copïo a'u pastio, yna cliciwch Kutools > Ystod > Gludo i'r Ystod Weladwy > Popeth or Gwerthoedd Gludo yn unig. Gweler y screenshot:
past doc cell weladwy 7

2. Yna a Gludo i'r Ystod Weladwy deialog pops allan, a dewis yr ystod rydych chi am gludo'r gwerthoedd. Gweler y screenshot:
past doc cell weladwy 8

3. Cliciwch OK. Nawr mae'r gwerthoedd a ddewiswyd yn cael eu pastio i'r ystod weladwy yn unig.

Gludwch werthoedd yn unig i gelloedd gweladwy Gludwch y cyfan i gelloedd gweladwy
past doc cell weladwy 9 past doc cell weladwy 10


Nodyn:
Mae'r cyfleustodau hwn yn gweithio ar resi neu golofnau cudd a hidlo

Cliciwch yma i gael mwy o wybodaeth fanwl am ddefnyddioldeb Gludo i Amrediad Gweladwy.

  Gludo i Gelloedd Gweladwy yn Unig

Offer Cynhyrchiant Swyddfa Gorau

🤖 Kutools AI Aide: Chwyldro dadansoddi data yn seiliedig ar: Cyflawniad Deallus   |  Cynhyrchu Cod  |  Creu Fformiwlâu Personol  |  Dadansoddi Data a Chynhyrchu Siartiau  |  Invoke Swyddogaethau Kutools...
Nodweddion Poblogaidd: Darganfod, Amlygu neu Adnabod Dyblygiadau   |  Dileu Rhesi Gwag   |  Cyfuno Colofnau neu Gelloedd heb Colli Data   |   Rownd heb Fformiwla ...
Super-edrych: VLookup Meini Prawf Lluosog    VLookup Gwerth Lluosog  |   VLookup Ar Draws Taflenni Lluosog   |   Edrych Niwlog ....
Rhestr gwympo Uwch: Creu Rhestr Gollwng yn Gyflym   |  Rhestr Gollwng Dibynnol   |  Rhestr Gollwng Aml-ddewis ....
Rheolwr Colofn: Ychwanegu Nifer Penodol o Golofnau  |  Symud Colofnau  |  Toglo Statws Gwelededd Colofnau Cudd  |  Cymharwch Ystodau a Cholofnau ...
Nodweddion dan Sylw: Ffocws ar y Grid   |  Golwg Dylunio   |   Bar Fformiwla Mawr    Rheolwr Llyfr Gwaith a Thaflen   |  Llyfrgell Adnoddau (Testun Auto)   |  Dewiswr Dyddiad   |  Cyfuno Taflenni Gwaith   |  Amgryptio/Dadgryptio Celloedd    Anfon E-byst trwy Restr   |  Hidlo Super   |   Hidlo Arbennig (hidlo mewn print trwm/italig/strikethrough...) ...
15 Set Offer Gorau12 Testun offer (Ychwanegu Testun, Dileu Cymeriadau,...)   |   50 + Siart Mathau (Siart Gantt,...)   |   40+ Ymarferol Fformiwlâu (Cyfrifwch oedran yn seiliedig ar ben-blwydd,...)   |   19 mewnosod offer (Mewnosod Cod QR, Mewnosod Llun o'r Llwybr,...)   |   12 Trosi offer (Rhifau i Eiriau, Trosi arian cyfred,...)   |   7 Uno a Hollti offer (Rhesi Cyfuno Uwch, Celloedd Hollt,...)   |   ... a mwy

Supercharge Eich Sgiliau Excel gyda Kutools ar gyfer Excel, a Phrofiad Effeithlonrwydd Fel Erioed Erioed. Kutools ar gyfer Excel Yn Cynnig Dros 300 o Nodweddion Uwch i Hybu Cynhyrchiant ac Arbed Amser.  Cliciwch Yma i Gael Y Nodwedd Sydd Ei Angen Y Mwyaf...

Disgrifiad


Mae Office Tab yn dod â rhyngwyneb Tabbed i Office, ac yn Gwneud Eich Gwaith yn Haws o lawer

  • Galluogi golygu a darllen tabbed yn Word, Excel, PowerPoint, Cyhoeddwr, Mynediad, Visio a Phrosiect.
  • Agor a chreu dogfennau lluosog mewn tabiau newydd o'r un ffenestr, yn hytrach nag mewn ffenestri newydd.
  • Yn cynyddu eich cynhyrchiant 50%, ac yn lleihau cannoedd o gliciau llygoden i chi bob dydd!
Comments (22)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Thank you very much hundred times
This comment was minimized by the moderator on the site
After going absolutely crazy trying to find a solution, this worked - specifically, the macro for pasting INTO visible only cells. Note that I was copying only from unfiltered cells. However, the people complaining that it doesn't do both (which I'm not sure is true) should be quiet because it's pretty easy to copy FROM only visible/filtered cells into an unfiltered area. You don't need a macro for that (and if you're trying to do both, just do the copying of filtered cells in Excel first, then use this macro). Again, what Excel is fully unable to do on its own without a macro is to paste to visible cells only. This macro saved my bum. Thanks!
This comment was minimized by the moderator on the site
Thanks for your recognition.
This comment was minimized by the moderator on the site
This worked perfectly, thanks!
This comment was minimized by the moderator on the site
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
This comment was minimized by the moderator on the site
Thansk for you reply, but it does not work. With your method, it paste all cells including hidden ones with the copied values.
This comment was minimized by the moderator on the site
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, 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...or at least I hope you can. I didn't save my data and UNDO does not work....
This comment was minimized by the moderator on the site
I am sorry for that.
This comment was minimized by the moderator on the site
So is there any update version for this situation?
This comment was minimized by the moderator on the site
It is even more flexible and functional if the inner loop is constructed with Do While loop.
This comment was minimized by the moderator on the site
This was very helpful. Many thanks.
This comment was minimized by the moderator on the site
i am currently developing a macro. In that i need to do filter for a particular column for Eg: Column D and need to paste some values Eg: Valid in column B. only i need to paste the value for the filtered cells. And also i want to know the coding for multiple filters at a time. EG: filtering in one column and checking the value and again do filter in another column without making false for the previous filter. help me on this.
This comment was minimized by the moderator on the site
This works great up to record 1163 of 23,000 and then it stops. Why would it stop?
This comment was minimized by the moderator on the site
You rock! I've had this issue multiple times in the past but it became a back-breaker for the recent project. And you've helped me to fix it beautifully. THANK YOU!
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations