Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Autofill until Null

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Autofill until Null

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"
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Autofill until Null

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 procedu 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Autofill until Null

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 procedu Method 'Worksheets' of object
'_Global' failed" What would give this error? I've never seen one like this
before. Thanks.

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
Failed to save table attributes of (null) into (null). Luca Brasi Excel Discussion (Misc queries) 2 February 4th 09 04:30 PM
COUNTIF says Null = Blank but Blank < Null Epinn Excel Worksheet Functions 4 October 25th 06 08:03 PM
Null, "null", vbNull, vbNullString, vbEmpty [email protected] Excel Programming 2 July 25th 06 01:28 PM
Autofill: Need to autofill one week block, (5) weekday only into cells. dstock Excel Discussion (Misc queries) 1 June 17th 05 08:21 PM
Q. Autofill question: Can I autofill alpha characters like I can numbers? George[_22_] Excel Programming 5 August 7th 04 10:33 AM


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