Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Copy range from one sheet to another cell by cell

Dear all,
I would like to copy range C1:C70 from Sheet1 (variable on InputB; if B is
5 then C1:C5 and if B is 40 then C1:C40) and paste into Sheet2 on the place
of RB (see below), I mean RB should be that range.
so it shold be like this

Sheet2(D2) = C1
Sheet2(D102) = C2
Sheet2(D202) = C3
..
..
..
Sheet2(D"B"02) = C"B"

I don't know how to define that starting RB is cell C1 and that the next RB
is cell C2
Thanks in advance


Sub Makronaredba1()
'
' Makronaredba1 Makronaredba
'

B = InputBox("Insert number of copies", "Umetanje prostorija")
Sheets("Podloga gubici").Select
Range("A1:AJ100").Select
Selection.Copy
Sheets("GUBICI").Select
RB = 0
For I = 1 To B * 100 Step 100
If Cells(I, 1).Value = 0 Then
Cells(I, 1).Select
ActiveSheet.Paste
End If
Cells(I + 1, 4).Value = RB + 1
RB = RB + 1
Next I
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copy range from one sheet to another cell by cell


I don't know that I understand what you want but could it be something
along these lines?:


VBA Code:
--------------------


Sub Makronaredba1()
B = InputBox("Insert number of copies", "Umetanje prostorija")
Set CColumnRng = Sheets("AnotherSheet").Range("C1:C" & B) 'I don't which sheet these cells are on
Sheets("Podloga gubici").Select
Range("A1:AJ100").Copy
Sheets("GUBICI").Select
RB = 0
For I = 1 To B * 100 Step 100
If Cells(I, 1).Value = 0 Then
Cells(I, 1).Select
ActiveSheet.Paste
End If
RB = RB + 1
Cells(I + 1, 4).Value = CColumnRng.Cells(RB).Value
Next I
End Sub

--------------------





Georges;697719 Wrote:

Dear all,
I would like to copy range C1:C70 from Sheet1 (variable on InputB; if B

is
5 then C1:C5 and if B is 40 then C1:C40) and paste into Sheet2 on the

place
of RB (see below), I mean RB should be that range.
so it shold be like this

Sheet2(D2) = C1
Sheet2(D102) = C2
Sheet2(D202) = C3
..
..
..
Sheet2(D"B"02) = C"B"

I don't know how to define that starting RB is cell C1 and that the

next RB
is cell C2
Thanks in advance


Sub Makronaredba1()
'
' Makronaredba1 Makronaredba
'

B = InputBox("Insert number of copies", "Umetanje prostorija")
Sheets("Podloga gubici").Select
Range("A1:AJ100").Select
Selection.Copy
Sheets("GUBICI").Select
RB = 0
For I = 1 To B * 100 Step 100
If Cells(I, 1).Value = 0 Then
Cells(I, 1).Select
ActiveSheet.Paste
End If
Cells(I + 1, 4).Value = RB + 1
RB = RB + 1
Next I
End Sub



--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile: http://www.thecodecage.com/forumz/member.php?u=558
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=195136

http://www.thecodecage.com/forumz

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Copy range from one sheet to another cell by cell

On Tue, 13 Apr 2010 11:28:09 +0000, p45cal wrote:

I don't know that I understand what you want but could it be something
along these lines?:


VBA Code:
--------------------



Sub Makronaredba1()
B = InputBox("Insert number of copies", "Umetanje prostorija")
Set CColumnRng = Sheets("AnotherSheet").Range("C1:C" & B) 'I don't which sheet these cells are on
Sheets("Podloga gubici").Select
Range("A1:AJ100").Copy
Sheets("GUBICI").Select
RB = 0
For I = 1 To B * 100 Step 100
If Cells(I, 1).Value = 0 Then
Cells(I, 1).Select
ActiveSheet.Paste
End If
RB = RB + 1
Cells(I + 1, 4).Value = CColumnRng.Cells(RB).Value
Next I
End Sub

--------------------






Georges;697719 Wrote:

Dear all,
I would like to copy range C1:C70 from Sheet1 (variable on InputB; if B

is
5 then C1:C5 and if B is 40 then C1:C40) and paste into Sheet2 on the

place
of RB (see below), I mean RB should be that range.
so it shold be like this

Sheet2(D2) = C1
Sheet2(D102) = C2
Sheet2(D202) = C3
..
..
..
Sheet2(D"B"02) = C"B"

I don't know how to define that starting RB is cell C1 and that the

next RB
is cell C2
Thanks in advance


Sub Makronaredba1()
'
' Makronaredba1 Makronaredba
'

B = InputBox("Insert number of copies", "Umetanje prostorija")
Sheets("Podloga gubici").Select
Range("A1:AJ100").Select
Selection.Copy
Sheets("GUBICI").Select
RB = 0
For I = 1 To B * 100 Step 100
If Cells(I, 1).Value = 0 Then
Cells(I, 1).Select
ActiveSheet.Paste
End If
Cells(I + 1, 4).Value = RB + 1
RB = RB + 1
Next I
End Sub


Thnx, I will check it tonight...
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Copy range from one sheet to another cell by cell

I find this usefull, thnx again!
Set CColumnRng = Sheets("AnotherSheet").Range("C1:C" & B) 'I don't which sheet these cells are on
Cells(I + 1, 4).Value = CColumnRng.Cells(RB).Value


On Tue, 13 Apr 2010 15:26:43 +0200, Georges wrote:

On Tue, 13 Apr 2010 11:28:09 +0000, p45cal wrote:

I don't know that I understand what you want but could it be something
along these lines?:


VBA Code:
--------------------



Sub Makronaredba1()
B = InputBox("Insert number of copies", "Umetanje prostorija")
Set CColumnRng = Sheets("AnotherSheet").Range("C1:C" & B) 'I don't which sheet these cells are on
Sheets("Podloga gubici").Select
Range("A1:AJ100").Copy
Sheets("GUBICI").Select
RB = 0
For I = 1 To B * 100 Step 100
If Cells(I, 1).Value = 0 Then
Cells(I, 1).Select
ActiveSheet.Paste
End If
RB = RB + 1
Cells(I + 1, 4).Value = CColumnRng.Cells(RB).Value
Next I
End Sub

--------------------






Georges;697719 Wrote:

Dear all,
I would like to copy range C1:C70 from Sheet1 (variable on InputB; if B

is
5 then C1:C5 and if B is 40 then C1:C40) and paste into Sheet2 on the

place
of RB (see below), I mean RB should be that range.
so it shold be like this

Sheet2(D2) = C1
Sheet2(D102) = C2
Sheet2(D202) = C3
..
..
..
Sheet2(D"B"02) = C"B"

I don't know how to define that starting RB is cell C1 and that the

next RB
is cell C2
Thanks in advance


Sub Makronaredba1()
'
' Makronaredba1 Makronaredba
'

B = InputBox("Insert number of copies", "Umetanje prostorija")
Sheets("Podloga gubici").Select
Range("A1:AJ100").Select
Selection.Copy
Sheets("GUBICI").Select
RB = 0
For I = 1 To B * 100 Step 100
If Cells(I, 1).Value = 0 Then
Cells(I, 1).Select
ActiveSheet.Paste
End If
Cells(I + 1, 4).Value = RB + 1
RB = RB + 1
Next I
End Sub


Thnx, I will check it tonight...

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy cell range in other sheet kalpesh Excel Worksheet Functions 1 December 30th 11 08:28 PM
Copy cell range to another sheet Albert Excel Programming 4 March 11th 10 01:14 PM
Selecting Range Based on Cell Content then Copy/Paste to New Sheet,Looping pwk Excel Programming 2 September 26th 09 02:18 PM
Finding a named range based on cell value and copy/paste to same sheet? Simon Lloyd[_715_] Excel Programming 1 May 11th 06 11:25 PM
To copy from a range in another sheet to the active cell raja Excel Programming 1 September 8th 05 04:47 PM


All times are GMT +1. The time now is 07:21 AM.

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

About Us

"It's about Microsoft Excel"