PC Review


Reply
Thread Tools Rate Thread

Autofill until Null

 
 
steinmetzw42 via OfficeKB.com
Guest
Posts: n/a
 
      5th Oct 2006
Hello,

I am having an issue with what I would believe to be an easy issue. I'm
trying to have column AU (starting a row 8) autofill with "N" untill the same
row in column A is null. Below is what I have been to use but it doesn't
want to work. Any thoughts on this would be much appreciated. Thanks.

Dim rng4 As Range

Set rng4 = Worksheets("shtXL").Cells(Rows.Count, 1).End(xlUp)
If rng4.Row < 8 Then
Set rng4 = Worksheets("shtXL").Range("A8")
Set rng5 = Worksheets("shtXL").Cells(Rows.Count, 3).End(xlUp)
rng5.AutoFill.Value = "N"

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200610/1

 
Reply With Quote
 
 
 
 
Jim Cone
Guest
Posts: n/a
 
      6th Oct 2006
Sub MakeItWork()
Dim SourceRange As Excel.Range
Dim fillRange As Excel.Range
Dim rng4 As Excel.Range
With Worksheets("shtXL")
Set rng4 = .Cells(.Rows.Count, 1).End(xlUp)
If rng4.Row < 10 Then
Exit Sub
Else
Set SourceRange = .Range("AU8")
SourceRange.Value = "N"
Set fillRange = .Range(SourceRange, .Cells(rng4.Row, "AU"))
SourceRange.AutoFill Destination:=fillRange ', Type:=xlFillValues
End If
End With
End Sub
------------
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware





"steinmetzw42 via OfficeKB.com"
wrote in message
Hello,
I am having an issue with what I would believe to be an easy issue. I'm
trying to have column AU (starting a row 8) autofill with "N" untill the same
row in column A is null. Below is what I have been to use but it doesn't
want to work. Any thoughts on this would be much appreciated. Thanks.

Dim rng4 As Range
Set rng4 = Worksheets("shtXL").Cells(Rows.Count, 1).End(xlUp)
If rng4.Row < 8 Then
Set rng4 = Worksheets("shtXL").Range("A8")
Set rng5 = Worksheets("shtXL").Cells(Rows.Count, 3).End(xlUp)
rng5.AutoFill.Value = "N"
 
Reply With Quote
 
steinmetzw42 via OfficeKB.com
Guest
Posts: n/a
 
      10th Oct 2006
Thanks Jim.

I'm now having an error pop-up while the code is running. The error is:
"There has been an error with the procedure: Method 'Worksheets' of object
'_Global' failed" What would give this error? I've never seen one like this
before. Thanks.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200610/1

 
Reply With Quote
 
Jim Cone
Guest
Posts: n/a
 
      12th Oct 2006
Post the code you are using and note where the error occurs.

I only follow up on my posts for about four days; I saw your response
only by accident. Good practical advice here...
http://www.cpearson.com/excel/newposte.htm
--
Jim Cone
San Francisco, USA
http://www.officeletter.com/blink/specialsort.html


"steinmetzw42 via OfficeKB.com" <u17775@uwe>
wrote in message
Thanks Jim.

I'm now having an error pop-up while the code is running. The error is:
"There has been an error with the procedure: Method 'Worksheets' of object
'_Global' failed" What would give this error? I've never seen one like this
before. Thanks.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
AutoFill null date Tara Microsoft Access VBA Modules 1 13th Feb 2008 05:37 PM
Outlook AutoFill Delete one autofill entry only katr52@yahoo.com Microsoft Outlook Discussion 4 5th Oct 2006 10:37 PM
Autofill: Need to autofill one week block, (5) weekday only into cells. dstock Microsoft Excel Misc 1 17th Jun 2005 08:21 PM
Q. Autofill question: Can I autofill alpha characters like I can numbers? George Microsoft Excel Programming 5 7th Aug 2004 10:33 AM
Null result when combining null field with non-null field in ADP View Lauren Quantrell Microsoft Access Form Coding 8 17th Nov 2003 02:34 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:14 AM.