+ Reply to Thread
Results 1 to 2 of 2

AutoFill Macro when blank cell in different column

Hybrid View

  1. #1
    Registered User
    Join Date
    08-18-2011
    Location
    Lincoln
    MS-Off Ver
    Excel 2003
    Posts
    2

    AutoFill Macro when blank cell in different column

    Hi There,

    I could really use some help with writing a macro to help me autofill a formula when a blank cell comes up in a different cell. I've looked at some others and tried to modify them but keep messing up.

    In the attached image you'll see I am trying to build an address by inputting the code =CONCATENATE(B3," ",$A$2) which would produce 1012 A ST in cell C3. I would like it to autofill the formula down until it hits the next street which in the example is A12 which is B ST . I wanted the macro to autofill until there was a blank cell in the B column. I found this to be the best method.

    The only other thing is I need 2 macro's because my field names change when there is a predirection such as 1012 S. 12th St. So I use the formula =CONCATENATE(B3," ",D3, " ", $A$2). I'm assuming I could just substitute the formula out in the macro code.

    If anyone could help me I would appreciate it. I am going to post two other parts of code that I was working with for reference, although they are doing different things.

    Thanks,
    Brett
    Attached Images Attached Images

  2. #2
    Registered User
    Join Date
    08-18-2011
    Location
    Lincoln
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: AutoFill Macro when blank cell in different column

    Sub filldata()
    Range(Range("B2"), Cells(Rows.Count, 3).End(xlUp).Offset(, -1)). _
    SpecialCells(xlCellTypeBlanks).FormulaR1C1 = "=R[-1]C"
    With Columns("B")
    .Value = .Value
    End With
    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1