Results 1 to 10 of 11

Thread: VBA Macro To Fill Missing Items In A Sequence Of Values Based On Criteria

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    Aug 2013
    Posts
    10
    Rep Power
    0

    VBA Macro To Fill Missing Items In A Sequence Of Values Based On Criteria

    I am trying to change the cells in my spreadsheet and created a macro but it is not working quite right. I had to update this because I confused the person that responded and hope other will view this because my macro is still not working. I might have to repost. There are blanks between the data have. So, I need to read the first item and change that cell as well as the following cells until I reach the next item. If that item is like, it will continue. If not, then it will paste the other label and fill in the blanks with that until it gets to the next. There are only 2. I hope this makes sense.

    Macro

    Code:
    'macro ten
    'implant update
    
    Sub imptype()
    Dim c As Range
    For Each c In Range("J1:J" & Range("J" & Rows.Count).End(xlUp).Row)
        c = IIf(UCase(c) = "AIP", "Implant Pass-through: Auto Invoice Pricing (AIP)", "Implant Pass-through: PPR Tied to Invoice")
    Next
    End Sub





    DATA Have
    AIP






    Standard




    AIP





    Standard




    AIP




    DATA Need
    Implant Pass-through: Auto Invoice Pricing (AIP)
    Implant Pass-through: PPR Tied to Invoice
    Implant Pass-through: PPR Tied to Invoice
    Implant Pass-through: PPR Tied to Invoice
    Implant Pass-through: PPR Tied to Invoice
    Implant Pass-through: PPR Tied to Invoice
    Implant Pass-through: PPR Tied to Invoice
    Implant Pass-through: PPR Tied to Invoice
    Implant Pass-through: PPR Tied to Invoice
    Implant Pass-through: PPR Tied to Invoice
    Implant Pass-through: Auto Invoice Pricing (AIP)
    Implant Pass-through: Auto Invoice Pricing (AIP)
    Implant Pass-through: PPR Tied to Invoice
    Implant Pass-through: PPR Tied to Invoice
    Implant Pass-through: PPR Tied to Invoice
    Implant Pass-through: Auto Invoice Pricing (AIP)
    Implant Pass-through: Auto Invoice Pricing (AIP)
    Implant Pass-through: Auto Invoice Pricing (AIP)
    Implant Pass-through: Auto Invoice Pricing (AIP)
    Implant Pass-through: Auto Invoice Pricing (AIP)
    Implant Pass-through: Auto Invoice Pricing (AIP)
    Last edited by tinamiller1; 08-28-2013 at 10:37 PM.

Similar Threads

  1. Replies: 1
    Last Post: 08-20-2013, 04:31 PM
  2. Replies: 4
    Last Post: 04-05-2013, 12:08 PM
  3. Sum values based on multiple criteria
    By Jorrg1 in forum Excel Help
    Replies: 8
    Last Post: 01-07-2013, 03:04 PM
  4. Macro to clear data based on color fill
    By Howardc in forum Excel Help
    Replies: 7
    Last Post: 12-03-2012, 09:25 AM
  5. Fetch multiple values based on criteria
    By Lucero in forum Excel Help
    Replies: 8
    Last Post: 04-07-2012, 12:35 PM

Posting Permissions

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