+ Reply to Thread
Results 1 to 3 of 3

Macros to Generate text

  1. #1
    Registered User
    Join Date
    09-05-2007
    Posts
    2

    Unhappy Macros to Generate text

    Hi,

    I'm new here, and am hoping someone can help me, i've racked my brains round this and i'm getting no where fast!

    I have an Excel file with 2 worksheets the first worksheet has 2017 rows, each rown is the name of a package, so for example.

    Combo 1
    Combo 2
    Combo 3
    Combo 1 with Movies
    Combo 2 with Movies
    Combo 3 with Movies

    and so on....

    on the second worksheet, I have descriptions for each of the elements, so in the example quoted above, there will be 4 descriptions:

    Combo 1 - Gives you 100 Programs
    Combo 2 - Gives you 200 Programs
    Combo 3 - Gives you 300 Programs
    Movies - Gives you 100 movies

    What I would like to do is take the text from the second worksheet and place it into a seperate cell along next to the package name (so if we assume the package name is column A, and the description is column B), for 2017 packages this would be extremely time consuming, so i'm trying to do this using Excels search functions and IF logic, but have had no success so far. The output of my example would be as follows:

    Column A Column B
    ======== ===========
    Combo 1 Gives you 100 Programs
    Combo 2 Gives you 200 Programs
    Combo 3 Gives you 300 Programs
    Combo 1 with Movies Gives you 100 Programs Gives you 100 movies
    Combo 2 with Movies Gives you 200 Programs Gives you 100 movies
    Combo 3 with Movies Gives you 300 Programs Gives you 100 movies

    Does any one have any ideas how I can create a macro that will do this?

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Have you tried VLOOKUP?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    09-05-2007
    Posts
    2
    I tried using V lookup, but the problem is that i'm actually searching for text strings within a cell, and returning information back dependant on what the search finds. VLookup would be fine, but in the case of say

    Combo 1 with Movies

    It wouldn't find a value to look up because that would not exist in the lookup table. Ideally any solution would be able to search the string and find the Combo 1 description, and the movies description.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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