Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Range formula copy

Any body please help....

Is there any way to place the below mentioned formula from the second cell
(second row) of the range €œRM1€ instead of the first row?



Range("RM1").Select
ActiveCell.FormulaR1C1 = "=CONCATENATE(LEFT(RC[-2],3))"
Range("RM1").FillDown

Thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Range formula copy

Try the below. You dont need to select the cell

Range("RM2").FormulaR1C1 = "=CONCATENATE(LEFT(RC[-2],3))"
Range("RM2:RM" & Cells(Rows.Count, "RK").End(xlUp).Row).FillDown

PS: left(cellreference,3) is enough

If this post helps click Yes
---------------
Jacob Skaria


" VLOOKUP fORMULA" wrote:

Any body please help....

Is there any way to place the below mentioned formula from the second cell
(second row) of the range €œRM1€ instead of the first row?



Range("RM1").Select
ActiveCell.FormulaR1C1 = "=CONCATENATE(LEFT(RC[-2],3))"
Range("RM1").FillDown

Thanks in advance

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default Range formula copy

Assuming it's a single-column contiguous range

Sub Tester()
With Range("RM1")
.Cells(2).FormulaR1C1 = _
"=CONCATENATE(LEFT(RC[-2],3))"
Range(.Cells(2), .Cells(.Cells.Count)).FillDown
End With
End Sub

Tim



" VLOOKUP fORMULA" wrote in
message ...
Any body please help....

Is there any way to place the below mentioned formula from the second cell
(second row) of the range "RM1" instead of the first row?



Range("RM1").Select
ActiveCell.FormulaR1C1 = "=CONCATENATE(LEFT(RC[-2],3))"
Range("RM1").FillDown

Thanks in advance



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Range formula copy



"Jacob Skaria" wrote:

Try the below. You dont need to select the cell

Range("RM2").FormulaR1C1 = "=CONCATENATE(LEFT(RC[-2],3))"
Range("RM2:RM" & Cells(Rows.Count, "RK").End(xlUp).Row).FillDown

PS: left(cellreference,3) is enough

If this post helps click Yes
---------------
Jacob Skaria


" VLOOKUP fORMULA" wrote:

Any body please help....

Is there any way to place the below mentioned formula from the second cell
(second row) of the range €œRM1€ instead of the first row?



Range("RM1").Select
ActiveCell.FormulaR1C1 = "=CONCATENATE(LEFT(RC[-2],3))"
Range("RM1").FillDown

Thanks in advance



The above formula given is not working, let me explain again.

My range name is €œRoom1€ (A1:A10)
The result is in (B1:B10) it is working fine with the below code.
My request was I want to keep B1 blank without any formula and fill the
formula from B2:B10.

Range("Room1").Select
ActiveCell.FormulaR1C1 = "=CONCATENATE(LEFT(RC[-1],3))"
Range("Room1").FillDown


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 181
Default Range formula copy

This will do what you're after

Range("Room1").Offset(1, 0).Resize(Range("Room1").Rows.Count - 1,
1).FormulaR1C1 = "=LEFT(RC[-1],3)"


not sure why you're using CONCATENATE as you're only referencing 1 thing,
but you can always add it back in if I've missed the idea!

HTH

Trevor Williams

" VLOOKUP fORMULA" wrote:



"Jacob Skaria" wrote:

Try the below. You dont need to select the cell

Range("RM2").FormulaR1C1 = "=CONCATENATE(LEFT(RC[-2],3))"
Range("RM2:RM" & Cells(Rows.Count, "RK").End(xlUp).Row).FillDown

PS: left(cellreference,3) is enough

If this post helps click Yes
---------------
Jacob Skaria


" VLOOKUP fORMULA" wrote:

Any body please help....

Is there any way to place the below mentioned formula from the second cell
(second row) of the range €œRM1€ instead of the first row?



Range("RM1").Select
ActiveCell.FormulaR1C1 = "=CONCATENATE(LEFT(RC[-2],3))"
Range("RM1").FillDown

Thanks in advance



The above formula given is not working, let me explain again.

My range name is €œRoom1€ (A1:A10)
The result is in (B1:B10) it is working fine with the below code.
My request was I want to keep B1 blank without any formula and fill the
formula from B2:B10.

Range("Room1").Select
ActiveCell.FormulaR1C1 = "=CONCATENATE(LEFT(RC[-1],3))"
Range("Room1").FillDown


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
VB copy formula and auto fill a range Blubber Excel Programming 4 October 30th 08 07:51 AM
Macro to copy a cell contains formula to a range Frank Situmorang[_2_] Excel Programming 2 June 4th 08 10:16 AM
copy formula down and ever change range Dean Excel Programming 3 June 6th 06 05:05 PM
copy formula in a range Monique Excel Programming 1 July 22nd 05 11:50 PM
How to copy formula from one cell to a range? Jason Weiss Excel Programming 1 April 22nd 05 03:54 PM


All times are GMT +1. The time now is 10:31 PM.

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"