Results 1 to 5 of 5

Conditional insert

Threaded View

  1. #1
    Forum Contributor
    Join Date
    10-05-2017
    Location
    Altamonte Springs, FL
    MS-Off Ver
    Office 365
    Posts
    146

    Conditional insert

    I'm trying to transfer the DOR Code column to DOR only if the Petition Date is less than three weekdays in the past and and the current value is blank.

    From what I've tried already, the DOR cells are still blank for ones that should have the new DOR Code (Recent dates). Any idea how I can actually get the DOR codes to copy over correctly?

    This is what I've come up with so far...

    'Apply DOR Codes to petitions not in CAT Yet
        Dim D As Range
        Dim LDate As Double
        Dim i As Integer
        LDate = DateAdd("w", -3, Date)
        For i = 1 To table1.Rows.Count
            If table1.ListColumns("Petition Date").DataBodyRange > LDate Then
                Set D = table1.ListColumns("DOR").DataBodyRange.Cells.SpecialCells(xlCellTypeBlanks)
                D.Formula = "=[@[DOR Code]]"
            End If
        Next i
    Thank you.
    Last edited by jmklei0; 09-13-2020 at 12:14 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Conditional insert into table
    By Syed Haider Ali in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-03-2017, 11:33 AM
  2. Conditional copy/insert row and conditional delete row
    By AKGinger in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-07-2015, 07:19 PM
  3. Adding a Conditional Insert Row
    By Darc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-12-2014, 07:28 AM
  4. Insert Conditional Rows
    By samsonuk in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-20-2013, 11:39 AM
  5. Replies: 7
    Last Post: 04-29-2013, 08:38 PM
  6. Conditional Text Insert
    By dcssb in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-22-2007, 11:24 PM
  7. conditional row and text insert
    By dtrance in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-12-2005, 01:31 PM

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