LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Can someone explain this code to me

I was given this code as a solution to inserting data in a cell down to the
the last cell

This references the cell to the immediate left to tell how many rows there
are.

How to I get it to look at a column 2 to the left or 1 to the right.

Range("E10").Select
ActiveCell.FormulaR1C1 = "stuff to insert"
Set rng = Selection(1, 1)
Set rng1 = Intersect(rng.CurrentRegion, Columns(rng.Column))
crTopRow = rng1.Rows(1).Row
Set rng1 = rng1.Offset(rng.Row - crTopRow, 0). _
Resize(rng1.Rows.Count - (rng.Row - crTopRow))
If rng1.Count 1 Then
Selection.AutoFill rng1
End If

Thanks (again)
Dave


 
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
Not sure how to explain.... Tricia LeAnn[_2_] Excel Discussion (Misc queries) 12 January 18th 08 07:14 PM
explain this one to me.... Dave F Excel Discussion (Misc queries) 10 November 16th 06 11:05 PM
Explain these please Sal Excel Worksheet Functions 1 March 24th 05 08:43 PM
please explain Jim Madsen Excel Programming 2 December 24th 03 04:44 PM
Please explain why following code doesn't work.... FMNT80 Excel Programming 2 July 23rd 03 06:07 PM


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