+ Reply to Thread
Results 1 to 2 of 2

Populating subcategory cells with adjacent text from category cells

  1. #1
    Registered User
    Join Date
    07-25-2012
    Location
    Europe
    MS-Off Ver
    Excel 2010
    Posts
    4

    Populating subcategory cells with adjacent text from category cells

    I have a rather tricky little problem. Not sure if it's best in this forum or another one.

    Anyway, I have a spreadsheet with about 10,000 records.

    Ignoring all the irrelevant stuff, I have 3 important columns.

    Every cell in column A is either the word Category or Subcategory. Under every cell that says Category, there are 2 or 3 or 4 cells that say Subcategory.

    So for example, column A for the first few records look like:

    Category
    Subcategory
    Subcategory
    Category
    Subcategory
    Subcategory
    Subcategory
    Category
    Subcategory
    Subcategory
    Subcategory
    Subcategory

    etc.

    In Column B, (if it says Category in A), there is a piece of text. If it says Subcategory there is nothing. Column C is empty whatever is in A.

    Now comes the tricky bit.

    What I want is, for every Subcategory under a Category, I want the text that is next to Category in B to be in column C for the Subcategories.

    In other words:

    If the spreadsheet just had these records and it looked like this:

    Column A Column B Column C

    Category (TEXT A) (Empty)
    Subcategory (Empty) (Empty)
    Subcategory (Empty) (Empty)
    Category (TEXT B) (Empty)
    Subcategory (Empty) (Empty)
    Subcategory (Empty) (Empty)
    Subcategory (Empty) (Empty)
    Category (TEXT C) (Empty)
    Subcategory (Empty) (Empty)
    Subcategory (Empty) (Empty)
    Subcategory (Empty) (Empty)
    Subcategory (Empty) (Empty)

    I was hoping to create some sort of macro or code that I could run and it would change the spreadsheet to:

    Column A Column B Column C

    Category (TEXT A) (Empty)
    Subcategory (Empty) (TEXT A)
    Subcategory (Empty) (TEXT A)
    Category (TEXT B) (Empty)
    Subcategory (Empty) (TEXT B)
    Subcategory (Empty) (TEXT B)
    Subcategory (Empty) (TEXT B)
    Category (TEXT C) (Empty)
    Subcategory (Empty) (TEXT C)
    Subcategory (Empty) (TEXT C)
    Subcategory (Empty) (TEXT C)
    Subcategory (Empty) (TEXT C)

    It might be impossible but I thought I would give it a try and see if anyone could help. Remember there are about 10,000 records.

    Cheers
    Last edited by MrRed; 07-25-2012 at 07:00 AM.

  2. #2
    Registered User
    Join Date
    07-25-2012
    Location
    Europe
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Populating subcategory cells with adjacent text from category cells

    Never mind, I sorted it out myself - just use F5.
    Last edited by MrRed; 07-25-2012 at 08:56 AM.

+ 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