ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy Formulae across... (https://www.excelbanter.com/excel-programming/371459-copy-formulae-across.html)

Darin Kramer

Copy Formulae across...
 
Hi There,

Im looking for VB that goes to cell C1, then goes down column C until it
hits a cell with information in it. Select that cell and copy and paste
it all the way to the right until it hits another cell in that row....

ANy ideas most welcome!!!

Regards

D



*** Sent via Developersdex http://www.developersdex.com ***

Tom Ogilvy

Copy Formulae across...
 
Sub EFG()
Dim rng As Range, rng2 As Range
Set rng = Range("C1").End(xlDown)
Set rng2 = rng.End(xlToRight)
Range(rng(1, 2), rng2(1, 0)).Value = rng.Value
End Sub

--
Regards,
Tom Ogilvy


"Darin Kramer" wrote:

Hi There,

Im looking for VB that goes to cell C1, then goes down column C until it
hits a cell with information in it. Select that cell and copy and paste
it all the way to the right until it hits another cell in that row....

ANy ideas most welcome!!!

Regards

D



*** Sent via Developersdex http://www.developersdex.com ***


Die_Another_Day

Copy Formulae across...
 
Range("C1").End(xlDown).Select
Selection.Copy Range(Selection, Selection.End(xlToRight).Offset(-1,0))

HTH

Charles Chickering

Darin Kramer wrote:
Hi There,

Im looking for VB that goes to cell C1, then goes down column C until it
hits a cell with information in it. Select that cell and copy and paste
it all the way to the right until it hits another cell in that row....

ANy ideas most welcome!!!

Regards

D



*** Sent via Developersdex http://www.developersdex.com ***



Darin Kramer

Copy Formulae across...
 


Thanks so much - works like a dream!

*** Sent via Developersdex http://www.developersdex.com ***


All times are GMT +1. The time now is 04:28 AM.

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