Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Paste values in VB
Hi I need some help with the pastevalues for this, which isn't pasting
values...: Sub UpdateBD1() Sheets("NEW").Range("K12:O12").Copy Destination:= _ Sheets("BD1").Range("C5").End(xlDown) _ .Offset(1, 0) End Sub I thank you in advance for your help. Alex |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Paste values in VB
Sub UpdateBD1()
Sheets("NEW").Range("K12:O12").Copy Sheets("BD1").Range("C5").End(xlDown) _ .Offset(1, 0).PasteSpecial xlValues End Sub -- Regards, Tom Ogilvy "Alex Martins" wrote in message ... Hi I need some help with the pastevalues for this, which isn't pasting values...: Sub UpdateBD1() Sheets("NEW").Range("K12:O12").Copy Destination:= _ Sheets("BD1").Range("C5").End(xlDown) _ .Offset(1, 0) End Sub I thank you in advance for your help. Alex |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Paste values in VB
Hey Tom, thanks for all your help!
This is giving me an error though...I copied what you sent and it says "application-defined or Object_defined error". Do you know what I might be doing wrong? Thanks again man. Alex "Tom Ogilvy" wrote: Sub UpdateBD1() Sheets("NEW").Range("K12:O12").Copy Sheets("BD1").Range("C5").End(xlDown) _ .Offset(1, 0).PasteSpecial xlValues End Sub -- Regards, Tom Ogilvy "Alex Martins" wrote in message ... Hi I need some help with the pastevalues for this, which isn't pasting values...: Sub UpdateBD1() Sheets("NEW").Range("K12:O12").Copy Destination:= _ Sheets("BD1").Range("C5").End(xlDown) _ .Offset(1, 0) End Sub I thank you in advance for your help. Alex |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Paste values in VB
Sheets("NEW").Range("K12:O12").Copy Sheets("BD1").Range("C5").End(xlDown).Offset(1, 0).PasteSpecial Paste:=xlPasteValues Hope that helps -- kraljb ------------------------------------------------------------------------ kraljb's Profile: http://www.excelforum.com/member.php...fo&userid=9955 View this thread: http://www.excelforum.com/showthread...hreadid=400915 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Paste values in VB
Hey K...I couldn't make that work...thanks for the help. If you think of
anything else please let me know. Thanks again for your help! Alex "kraljb" wrote: Sheets("NEW").Range("K12:O12").Copy Sheets("BD1").Range("C5").End(xlDown).Offset(1, 0).PasteSpecial Paste:=xlPasteValues Hope that helps -- kraljb ------------------------------------------------------------------------ kraljb's Profile: http://www.excelforum.com/member.php...fo&userid=9955 View this thread: http://www.excelforum.com/showthread...hreadid=400915 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Paste values in VB
Alex,
On sheet BD1, do you have any data in column C in/after row 6? If not, that would cause the error. Both of the suggestions worked for me, although I did have to put a line continuation character (space underscore space) in this one after PasteSpecial: Sheets("NEW").Range("K12:O12").Copy Sheets("BD1").Range("C5").End(xlDown).Offset(1, 0).PasteSpecial _ Paste:=xlPasteValues Regards, Patti "Alex Martins" wrote in message ... Hey K...I couldn't make that work...thanks for the help. If you think of anything else please let me know. Thanks again for your help! Alex "kraljb" wrote: Sheets("NEW").Range("K12:O12").Copy Sheets("BD1").Range("C5").End(xlDown).Offset(1, 0).PasteSpecial Paste:=xlPasteValues Hope that helps -- kraljb ------------------------------------------------------------------------ kraljb's Profile: http://www.excelforum.com/member.php...fo&userid=9955 View this thread: http://www.excelforum.com/showthread...hreadid=400915 |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Paste values in VB
You would have that problem if there were all empty cells from C6 to the
last cell in that column. You would have the same problem with your original code. Sub UpdateBD1() dim rng as Range set rng = sheets("BD1").range("C5") if not isempty(rng) then if isempty(rng.offset(1,0) then set rng = rng.offset(1,0) else set rng = rng.end(xldown)(2) end if Sheets("NEW").Range("K12:O12").Copy rng.PasteSpecial xlValues End Sub -- Regards, Tom Ogilvy "Alex Martins" wrote in message ... Hey Tom, thanks for all your help! This is giving me an error though...I copied what you sent and it says "application-defined or Object_defined error". Do you know what I might be doing wrong? Thanks again man. Alex "Tom Ogilvy" wrote: Sub UpdateBD1() Sheets("NEW").Range("K12:O12").Copy Sheets("BD1").Range("C5").End(xlDown) _ .Offset(1, 0).PasteSpecial xlValues End Sub -- Regards, Tom Ogilvy "Alex Martins" wrote in message ... Hi I need some help with the pastevalues for this, which isn't pasting values...: Sub UpdateBD1() Sheets("NEW").Range("K12:O12").Copy Destination:= _ Sheets("BD1").Range("C5").End(xlDown) _ .Offset(1, 0) End Sub I thank you in advance for your help. Alex |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
find values in multiple cells and paste row values | Excel Discussion (Misc queries) | |||
can you change the default paste method? (paste values) | Excel Discussion (Misc queries) | |||
Dynamic Copy/Paste Special Formulas/Paste Special Values | Excel Programming | |||
How do i compare values from two sheet and copy & paste if values match? | Excel Programming | |||
Paste values | Excel Programming |