Results 1 to 11 of 11

AutoFill with dynamic destination

Threaded View

  1. #8
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,526

    Re: AutoFill with dynamic destination

    You could be stuck on AutoFill, not really required.

    Sub Do_It()
        Dim LstRw As Long
        Dim Rng As Range
    
        LstRw = Cells(Rows.Count, "A").End(xlUp).Row
        Set Rng = Range("C2:C" & LstRw)
        Rng = "=IF(B2>0,1,0)"
    End Sub
    BTW, if you wanted to do this without the formulas on the sheet:

    Sub GrtrThanZero()
        Dim LstRw As Long, c As Range
        Dim Rng As Range, x
    
        LstRw = Cells(Rows.Count, "A").End(xlUp).Row
        Set Rng = Range("B2:B" & LstRw)
        For Each c In Rng.Cells
            x = IIf(c > 0, 1, 0)
            c.Offset(, 1) = x
        Next c
    End Sub
    Last edited by davesexcel; 11-22-2017 at 09:07 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Dynamic AutoFill Destination Range
    By cesrua in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-18-2016, 03:33 PM
  2. Copy from static destination & paste to dynamic destination
    By Marbleking in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-31-2015, 09:31 AM
  3. Selection AutoFill Destination
    By h.noor in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-09-2015, 01:39 AM
  4. [SOLVED] Autofill Destination Range
    By ERaasio in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-14-2014, 03:02 PM
  5. [SOLVED] AutoFill Destination
    By batchy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-06-2014, 12:22 PM
  6. Autofill in VBA with a dynamic "Destination" range
    By ConneXionLost in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-04-2011, 04:55 PM
  7. autofill to variable destination
    By katmison in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-30-2009, 06:57 PM

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