+ Reply to Thread
Results 1 to 2 of 2

help with re-presenting a table using function or macro

  1. #1
    Registered User
    Join Date
    12-14-2017
    Location
    Muscat, Oman
    MS-Off Ver
    Mac (14.7.7)
    Posts
    2

    help with re-presenting a table using function or macro

    I have a sheet that contains the following information
    Sheet 1
    Column 1: number: (1-6)
    Column 2: text: a colour associated with each number in Column 1 (1=blue, 2=green, 3=yellow, etc)
    Column 3: number: the number of different boxes that contain the colours next to the colour

    For example, if box 1 contains blue and green, then there will be a number 1 in column 3 in row 1 (blue) and row 2 (green). If box 2 contains green and yellow, there will be a 2 in column 3 in row 2 (green) and row 3 (yellow). There are 5 boxes in total.
    See image 1Screen Shot 2017-12-14 at 21.22.37.png

    What I would like to do, is then present the same information in a different order on a new sheet
    Sheet 2
    Column 1: number: the number of each box
    Column 2: number: the numbers of the colours in this box
    Column 3: text: the names of the colours in this box
    See image 2Screen Shot 2017-12-14 at 21.31.07.png

    I would like to do this using functions/macros so that if I make any changes to sheet 1, sheet 2 automatically updates.

    Any help would be greatly appreciated

    Regards
    Last edited by thejurors; 12-14-2017 at 01:36 PM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: help with re-presenting a table using function or macro

    Since there's a direct lookup between a number and a colour why not collect the data in a more useful layout and then apply a lookup formula and present with a Pivot Table.

    See attached.

    But this is clearly a much simplified example and probably doesn't represent the size of your actual data. We often find that when we give an answer to what is a trivial non representative example when the solution is used with the real world data it doesn't work because of factors like string length and other stuff which is important but hasn't been mentioned.

    Therefore upload your real workbook (or at least a cut down copy), and manually add the results you expect to see. Clearly identify which is original data and which are the results and in a note clearly explain how you have arrived at your results.
    Attached Files Attached Files
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the 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: 2
    Last Post: 02-04-2016, 10:16 AM
  2. Replies: 1
    Last Post: 07-24-2015, 01:58 AM
  3. Presenting and printing a payroll pivot table
    By nchinas in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 09-03-2014, 07:10 PM
  4. Pivot Table Presenting Data
    By StuartBos in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-25-2014, 05:06 AM
  5. Excel - Arranging, Matching & Presenting data using a macro.
    By AliJay in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-13-2010, 01:49 AM
  6. Presenting Data
    By aesaund in forum Excel General
    Replies: 0
    Last Post: 05-10-2005, 11:33 AM
  7. [SOLVED] presenting lots of data in a chart & table
    By tee in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 04-30-2005, 07:11 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