#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default 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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default 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






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default 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








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"