Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Fill in the blanks

Hello,
I would like to fill in the blanks cells in column A row 14 through
last used row with the formula =mid(A2,2,10). Column B has last used
row.

Im trying unsucessfully to use something like, but it isn't filling in
the blanks:

Dim LastRow As Long
Dim rng As Range
Dim i As Long
LastRow = Cells(Rows.Count, "B").End(xlUp).Row
For i = 14 To cLastRow
'If Cells(i, "A").Value = "" Then
Cells(i, "A").Formula = "=MID(R[-12]C[2],2,10)"

' End If
Next i

Thank you
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 420
Default Fill in the blanks

You changed a variable name (LastRow vs cLastRow) and you'd want to use
..FormulaR1C1 (not .formula) since you're creating a formula using R1C1 reference
style:

Dim LastRow As Long
Dim rng As Range
Dim i As Long
LastRow = Cells(Rows.Count, "B").End(xlUp).Row
For i = 14 To LastRow
'If Cells(i, "A").Value = "" Then
Cells(i, "A").FormulaR1C1 = "=MID(R[-12]C[2],2,10)"

' End If
Next i


On 06/25/2010 10:34, wrote:
Hello,
I would like to fill in the blanks cells in column A row 14 through
last used row with the formula =mid(A2,2,10). Column B has last used
row.

Im trying unsucessfully to use something like, but it isn't filling in
the blanks:

Dim LastRow As Long
Dim rng As Range
Dim i As Long
LastRow = Cells(Rows.Count, "B").End(xlUp).Row
For i = 14 To cLastRow
'If Cells(i, "A").Value = "" Then
Cells(i, "A").Formula = "=MID(R[-12]C[2],2,10)"

' End If
Next i

Thank you


--
Dave Peterson
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
Fill in Blanks Steve Stad Excel Programming 6 April 15th 10 12:48 AM
How to fill up blanks deeds Excel Discussion (Misc queries) 4 October 13th 09 05:52 PM
Fill in the blanks! Bhupinder Rayat Excel Programming 2 March 2nd 06 04:46 PM
Fill in the blanks BOB Excel Programming 1 January 31st 05 06:21 PM
Fill in the blanks Jim Thomlinson[_3_] Excel Programming 0 January 31st 05 06:16 PM


All times are GMT +1. The time now is 02:01 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"