Results 1 to 3 of 3

Thread: macro problem posting not correctly

  1. #1

    macro problem posting not correctly



    Register for a FREE account, and/
    or Log in to avoid these ads!

    I am trying to change the cells of a 935 row worksheet but it keeps changing everything to the same thing. My macro is:

    Code:
    'macro fifteen
    'implant update
    Sub imptype()
    Dim c As Range
    For Each c In Range("l2:l" & Range("l" & 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
    imptype
    AIP
    Standard
    Standard
    Standard
    Standard
    AIP
    AIP
    AIP
    Standard
    AIP
    Standard
    AIP
    DATA Need
    imptype
    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: Auto Invoice Pricing (AIP)
    Implant Pass-through: Auto Invoice Pricing (AIP)
    Implant Pass-through: Auto Invoice Pricing (AIP)
    Implant Pass-through: PPR Tied to Invoice
    Implant Pass-through: Auto Invoice Pricing (AIP)
    Implant Pass-through: PPR Tied to Invoice
    Implant Pass-through: Auto Invoice Pricing (AIP)

  2. #2
    Magician NoS's Avatar
    Join Date
    Jan 2013
    Location
    British Columbia
    Posts
    718
    Articles
    0
    Excel Version
    Excel 2010 64bit
    Maybe try IIf(UCase(Trim(c)) in case there are spaces that you can't see.

  3. #3
    That worked. Thanks

Tags for this Thread

Posting Permissions

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