+ Reply to Thread
Results 1 to 4 of 4

Generate a List of Subject Codes

  1. #1
    Registered User
    Join Date
    09-12-2018
    Location
    Port of Spain, Trinidad
    MS-Off Ver
    Excel 16
    Posts
    53

    Generate a List of Subject Codes

    Hi Good Day All. My objective is to automatically generate a list of subject codes. The inputs are the Subject, Level and Number.

    Example If I entered Maths,2,4 respectively, I would want an automatically generated output that says Maths2-1, Maths2-2,Maths2-3, Maths2-4. Please see worksheet attached for better clarification.

    I am not sure if this can be solved with a formula or would vba be better. Any help will be greatly appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,973

    Re: Generate a List of Subject Codes

    You could do it using formula. But I'd recommend using PowerQuery (Get & Transform).

    Select A1:C4 and Data ribbon -> From Table/Range.

    Once in the editor. Add custom column.

    Please Login or Register  to view this content.
    Then use button at top right of the custom column to expand to rows.

    Select Level & custom column. Right click merge, Separator -> Custom and use dash '-'.
    Select Subject & merged column and merge, without separator. Right click on Number and remove column.
    Rename merged column as Subject Code.

    Return result to desired location in sheet.

    As you add more to the original list, you can just refresh the table to update with more Subject Code.

    See attached.
    Attached Files Attached Files
    "Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something."
    ― Robert A. Heinlein

  3. #3
    Registered User
    Join Date
    09-12-2018
    Location
    Port of Spain, Trinidad
    MS-Off Ver
    Excel 16
    Posts
    53

    Re: Generate a List of Subject Codes

    It works. Thank you very much.

    I just need to spend some time understanding this feature because it might be able to help a lot in the future.

    Thanks once again

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,973

    Re: Generate a List of Subject Codes

    You are welcome

    If you are satisfied with the solution, please mark the thread as solved using thread tools found at top of your initial post.

+ 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. Replies: 5
    Last Post: 01-24-2019, 11:44 AM
  2. Replies: 1
    Last Post: 01-23-2019, 05:17 PM
  3. Replies: 17
    Last Post: 01-12-2018, 12:57 PM
  4. [SOLVED] Help comparing two files by subject+Date, subject+DatePlus1, Subject+DateMinus1
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 07-11-2017, 07:37 AM
  5. [VBA] [Generate Email] - End of Subject line
    By synergeticink in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-25-2017, 12:28 PM
  6. Formula to Generate a list of codes
    By Animella in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 01-09-2014, 07:46 AM
  7. How to generate a LIST from codes
    By bitswit in forum Excel General
    Replies: 8
    Last Post: 08-22-2010, 05:33 PM

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