Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Paste special
Hi,
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".. Is it possible? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Paste special
Hi Pietro.
You don't have to activate the Italian sheet to paste to it, assuming that you want to copy one cell and paste it into the first enpty cell in Column C then try: Option Explicit Sub PasteIt() Dim cValue As Double Dim nFormat As String Dim Here As Long cValue = ActiveCell.Value nFormat = ActiveCell.NumberFormat With Sheets("Italian") Here = .Cells(1, 3).End(xlDown).Row + 1 .Cells(Here, 3).Value = cValue .Cells(Here, 3).NumberFormat = nFormat End With End Sub If you do really want to activate the sheet then use: Sub PasteIt2() Dim cValue As Double Dim nFormat As String Dim Here As Long cValue = ActiveCell.Value nFormat = ActiveCell.NumberFormat Sheets("Italian").Activate Here = Cells(1, 3).End(xlDown).Row + 1 Cells(Here, 3).Value = cValue Cells(Here, 3).NumberFormat = nFormat End Sub -- HTH Sandy In Perth, the ancient capital of Scotland and the crowning place of kings Replace @mailinator.com with @tiscali.co.uk "Pietro" wrote in message ... Hi, 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".. Is it possible? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Paste special
Thank you for your answer..
But i still did not select the cell,i need to select it and excute the below command to paste an entire row starting from the select cell(the first empty cell in coumn C): Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _ xlNone, SkipBlanks:=False, Transpose:=False "Sandy Mann" wrote: Hi Pietro. You don't have to activate the Italian sheet to paste to it, assuming that you want to copy one cell and paste it into the first enpty cell in Column C then try: Option Explicit Sub PasteIt() Dim cValue As Double Dim nFormat As String Dim Here As Long cValue = ActiveCell.Value nFormat = ActiveCell.NumberFormat With Sheets("Italian") Here = .Cells(1, 3).End(xlDown).Row + 1 .Cells(Here, 3).Value = cValue .Cells(Here, 3).NumberFormat = nFormat End With End Sub If you do really want to activate the sheet then use: Sub PasteIt2() Dim cValue As Double Dim nFormat As String Dim Here As Long cValue = ActiveCell.Value nFormat = ActiveCell.NumberFormat Sheets("Italian").Activate Here = Cells(1, 3).End(xlDown).Row + 1 Cells(Here, 3).Value = cValue Cells(Here, 3).NumberFormat = nFormat End Sub -- HTH Sandy In Perth, the ancient capital of Scotland and the crowning place of kings Replace @mailinator.com with @tiscali.co.uk "Pietro" wrote in message ... Hi, 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".. 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) | |||
'paste special', 'paste link' formatting transfer | Excel Discussion (Misc queries) | |||
PASTE LINK option not available when I select PASTE SPECIAL to link an image in Excel to a Word document. | Links and Linking in Excel | |||
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 |