+ Reply to Thread
Results 1 to 2 of 2

Macro - Insert text based on text in a list

  1. #1
    Registered User
    Join Date
    12-13-2017
    Location
    Sweden
    MS-Off Ver
    Office 365 v2207
    Posts
    8

    Macro - Insert text based on text in a list

    Hi

    I need help with a macro. I have two lists in A-B and E-F. I want the text in F to be inserted in C with the corresponding values in B and E.
    macro.jpg

    Thanks in advance.

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,936

    Re: Macro - Insert text based on text in a list

    Just use a formula. In C3, try either

    =IFERROR(VLOOKUP(B3,E:F,2,False),"")

    or

    =IF(COUNTIF($B$3:B3,B3)=COUNTIF(B:B,B3),IFERROR(VLOOKUP(B3,E:F,2,FALSE),""),"")

    (I'm not sure of what your actual logic is....)
    Bernie Deitrick
    Excel MVP 2000-2010

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Macro to insert rows with copied text a certain amount of times based on a value in a cell
    By rhendrickson11 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-21-2017, 11:20 AM
  2. Replies: 5
    Last Post: 03-21-2017, 10:30 PM
  3. [SOLVED] Macro to sort and insert text based on a cell's value, and other small things.
    By taylorsm in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 02-27-2017, 07:51 PM
  4. [SOLVED] Macro to Insert copy of Row based on text String
    By j2591 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-28-2013, 09:32 AM
  5. Need Help w/Macro That Will Insert Column Based on Specific Text in a Given Cell
    By pb6933944 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-23-2012, 12:23 PM
  6. Replies: 3
    Last Post: 03-08-2012, 12:07 PM
  7. Insert Row macro based on text String
    By georgeanaprop in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-20-2009, 03:29 AM

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