Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Paste special2
I need a code to activate a tab named "Italian",then to SELECT the first
empty row in column C ,then to paste special "Values and numbers format",this command should paste an entire row starting from the selected cell (the first empty cell in column C) Is it possible? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Paste special2
On Oct 14, 12:51 pm, Pietro wrote:
I need a code to activate a tab named "Italian",then to SELECT the first empty row in column C ,then to paste special "Values and numbers format",this command should paste an entire row starting from the selected cell (the first empty cell in column C) Is it possible? I am assuming that you will already have something stored to your clipboard. Otherwise, you won't be pasting anything. Really need more detail, but this code will take what is on the clipboard and paste it's values and formats into the first available row in column C and all the way over to column IV (because you said the whole row). Like I said, a more detailed answer could be given if more detail can be provided. Sub pasteValuesFormats() Dim r As Long With Sheets("Italian") r = .Cells(.Rows.Count, "C") _ .End(xlUp).Offset(1, 0).Row .Range(Cells(r, "C"), Cells(r, "IV")).PasteSpecial _ Paste:=xlPasteValuesAndNumberFormats, Operation:= _ xlNone, SkipBlanks:=False, Transpose:=False End With End Sub |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Paste special2
Hi Pietro:
Dim i As Long Sheets("Italian").Activate For i = 1 To Rows.Count If Cells(i, "C").Value = "" Then Exit For End If Next Cells(i, "C").PasteSpecial Paste:=xlPasteValues Cells(i, "C").PasteSpecial Paste:=xlPasteFormats The quantity of cells that are pasted depends upon the Copy: Sub pietro() Dim i As Long Sheets("Italian").Activate Range("A26:H26").Copy For i = 1 To Rows.Count If Cells(i, "C").Value = "" Then Exit For End If Next Cells(i, "C").PasteSpecial Paste:=xlPasteValues Cells(i, "C").PasteSpecial Paste:=xlPasteFormats End Sub will copy 8 cells. -- Gary''s Student - gsnu200749 "Pietro" wrote: I need a code to activate a tab named "Italian",then to SELECT the first empty row in column C ,then to paste special "Values and numbers format",this command should paste an entire row starting from the selected cell (the first empty cell in column C) Is it possible? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can't Copy and Paste or Paste Special between Excel Workbooks | Excel Discussion (Misc queries) | |||
In Excel: add a Paste-Special Option to paste IN REVERSE ORDER. | Excel Worksheet Functions | |||
Paste and Paste Special command are not enabled in Excel | Excel Worksheet Functions | |||
Excel cut/Paste Problem: Year changes after data is copy and paste | Excel Discussion (Misc queries) | |||
Paste Link enters a 0 into the cell where I paste. How do I elemin | Excel Discussion (Misc queries) |