ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Help Please (https://www.excelbanter.com/excel-programming/333957-help-please.html)

ALEX

Help Please
 
Dear ALL

I have the following question:

I placed the button on the excel sheet and assign a macro which cuts the
cells' values from range b1:b4 and pastes them into range a10:d10 everything
is ok and works perfectly, but how can I do so that when I press the button
again the new values which i type in range b1:b4 placed in a11:d11 ? and so
on, is it possible?

Please help me with this
Thank you in advance

Bob Phillips[_7_]

Help Please
 
Something like

iRow = Cells(Rows.Count, "A").End(xlUp).Row
If iRow 10 Or Range("A10").Value < "" Then
iRow = iRow + 1
Else
iRow = 10
End If
' do your copy
Range("A" & iRow).Resize(1, 4).Paste


--
HTH

Bob Phillips

"Alex" wrote in message
...
Dear ALL

I have the following question:

I placed the button on the excel sheet and assign a macro which cuts the
cells' values from range b1:b4 and pastes them into range a10:d10

everything
is ok and works perfectly, but how can I do so that when I press the

button
again the new values which i type in range b1:b4 placed in a11:d11 ? and

so
on, is it possible?

Please help me with this
Thank you in advance




ALEX

Help Please
 
Dear Bob
thank you for your answer but here i have some questions.

Where should i place this code?

when i am placing it as a button code i have the error message "Object
doesn't support this property or method "

could you explain me with step by step?

Thank you

"Bob Phillips" wrote:

Something like

iRow = Cells(Rows.Count, "A").End(xlUp).Row
If iRow 10 Or Range("A10").Value < "" Then
iRow = iRow + 1
Else
iRow = 10
End If
' do your copy
Range("A" & iRow).Resize(1, 4).Paste


--
HTH

Bob Phillips

"Alex" wrote in message
...
Dear ALL

I have the following question:

I placed the button on the excel sheet and assign a macro which cuts the
cells' values from range b1:b4 and pastes them into range a10:d10

everything
is ok and works perfectly, but how can I do so that when I press the

button
again the new values which i type in range b1:b4 placed in a11:d11 ? and

so
on, is it possible?

Please help me with this
Thank you in advance





Bob Phillips[_7_]

Help Please
 
Show your full code, and how is the button assigned?

--
HTH

Bob Phillips

"Alex" wrote in message
...
Dear Bob
thank you for your answer but here i have some questions.

Where should i place this code?

when i am placing it as a button code i have the error message "Object
doesn't support this property or method "

could you explain me with step by step?

Thank you

"Bob Phillips" wrote:

Something like

iRow = Cells(Rows.Count, "A").End(xlUp).Row
If iRow 10 Or Range("A10").Value < "" Then
iRow = iRow + 1
Else
iRow = 10
End If
' do your copy
Range("A" & iRow).Resize(1, 4).Paste


--
HTH

Bob Phillips

"Alex" wrote in message
...
Dear ALL

I have the following question:

I placed the button on the excel sheet and assign a macro which cuts

the
cells' values from range b1:b4 and pastes them into range a10:d10

everything
is ok and works perfectly, but how can I do so that when I press the

button
again the new values which i type in range b1:b4 placed in a11:d11 ?

and
so
on, is it possible?

Please help me with this
Thank you in advance







ALEX

Help Please
 
This is code Sub Macro2()
'
' Macro2 Macro
' Macro recorded 7/8/2005 by AI
'

'
Range("B1").Select
Selection.Cut
Range("A10").Select
ActiveSheet.Paste
Range("B2").Select
Selection.Cut
Range("B10").Select
ActiveSheet.Paste
Range("B3").Select
Selection.Cut
Range("C10").Select
ActiveSheet.Paste
Range("B4").Select
Selection.Cut
Range("D10").Select
ActiveSheet.Paste
End Sub

Button is placed from Forms and then a macro is assigned to it.

"Bob Phillips" wrote:

Show your full code, and how is the button assigned?

--
HTH

Bob Phillips

"Alex" wrote in message
...
Dear Bob
thank you for your answer but here i have some questions.

Where should i place this code?

when i am placing it as a button code i have the error message "Object
doesn't support this property or method "

could you explain me with step by step?

Thank you

"Bob Phillips" wrote:

Something like

iRow = Cells(Rows.Count, "A").End(xlUp).Row
If iRow 10 Or Range("A10").Value < "" Then
iRow = iRow + 1
Else
iRow = 10
End If
' do your copy
Range("A" & iRow).Resize(1, 4).Paste


--
HTH

Bob Phillips

"Alex" wrote in message
...
Dear ALL

I have the following question:

I placed the button on the excel sheet and assign a macro which cuts

the
cells' values from range b1:b4 and pastes them into range a10:d10
everything
is ok and works perfectly, but how can I do so that when I press the
button
again the new values which i type in range b1:b4 placed in a11:d11 ?

and
so
on, is it possible?

Please help me with this
Thank you in advance








All times are GMT +1. The time now is 07:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com