Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: lookup macro

  1. #1
    New Member
    Join Date
    Apr 2002
    Location
    Suffolk, UK
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    new-ish excel user so apologies if answer is obvious!

    I need to take a 140 column comma delimted file, import into Excel, assign new values to 30 of the columns based on a lookup (e.g. if column entry = Mr, replace with CG1254SFV), then export it again as a comma delimited file with "" marks around each value.

    And I need to make this an automated procedure using a macro

    Is this something I can do in Excel?

    Any feedback greatly appreciated.

  2. #2
    Board Regular
    Join Date
    Apr 2002
    Location
    Channel Islands, Britain.
    Posts
    776
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Haven't tried it myself but surely just import the file. Start recording a macro. Run text to columns. Input lookups. Save as file type .CSV (for comma delimited).

    Does this work?

    Jim

  3. #3
    New Member
    Join Date
    Apr 2002
    Location
    Suffolk, UK
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks Jimbo - think I gave too much info in the problem. Happy with the import, report macro and save as csv. Where I was coming from is the lookup side of things. The worksheet will have 140 columns, 40 of which will have values that I need to change, and each column might have 100+ different possibilities for the lookup, e.g. occupation. I have a table of occupation codes and I would need to change all the data in the column, e.g. mechanic becomes CVF1254DF etc. As I need to do this for 30 columns, I was looking for the best way of carrying this out?

    Hope this is clear, fear it is not

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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