Copy all result and put them all together in the next columns

motilulla

Well-known Member
Joined
Feb 13, 2008
Messages
2,422
Office Version
  1. 2010
Hello,</SPAN></SPAN>

Data column "C" and columns D:F got results what I want copy all results of columns D:F and put them together in the columns H:I as shown in the example below</SPAN></SPAN>


Book1
ABCDEFGHIJ
1
2
3
4
5Numn1n2n3n1n2n3
60011011
71111111
8011321132
902133
10027811
11037813
120328628
130428654
1404715118
15132133
1612
1711
1810
199
208
217
226
235
244
253
262
271
28027811
290
300
310
320
330
340
350
360
370
380
391137813
4010
419
428
437
446
455
464
473
482
491
500328628
510
520
530
540
558428654
567
576
585
594
603
612
621
6304715118
640
650
660
670
680
Sheet2


Thanks In Advance </SPAN></SPAN>
Using version 2000</SPAN></SPAN>

Regards,</SPAN></SPAN>
Moti</SPAN></SPAN>
 
Last edited:

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
If the values in cols D:F are constants (not formulas) try
Code:
Sub Motilulla()
   Range("D:F").SpecialCells(xlConstants).Copy Range("H5")
End Sub
 
Upvote 0
try this.

Code:
Sub do_it()


For r = 6 To Cells(Rows.Count, "D").End(xlUp).Row
If Cells(r, "D") <> "" Then

lr = Cells(Rows.Count, "H").End(xlUp).Row + 1

Range(Cells(lr, "H"), Cells(lr, "J")).Value = Range(Cells(r, "D"), Cells(r, "F")).Value
End If
Next r
End Sub

Ross
 
Upvote 0
If the values in cols D:F are constants (not formulas) try
Code:
Sub Motilulla()
   Range("D:F").SpecialCells(xlConstants).Copy Range("H5")
End Sub
Fluff, yes it works as you declare with values. But in this case column "D" results are generated by the formula. So it highlight the range in VBA</SPAN></SPAN>

Thank you for your help and time
</SPAN></SPAN>

Kind Regards,
</SPAN></SPAN>
Moti
</SPAN></SPAN>
 
Upvote 0
try this.

Code:
Sub do_it()


For r = 6 To Cells(Rows.Count, "D").End(xlUp).Row
If Cells(r, "D") <> "" Then

lr = Cells(Rows.Count, "H").End(xlUp).Row + 1

Range(Cells(lr, "H"), Cells(lr, "J")).Value = Range(Cells(r, "D"), Cells(r, "F")).Value
End If
Next r
End Sub

Ross
rpaulson, code worked perfect! As request.</SPAN></SPAN>

Thank you for your help and time
</SPAN></SPAN>

Kind Regards,
</SPAN></SPAN>
Moti
</SPAN></SPAN>
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,223
Members
452,620
Latest member
dsubash

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top