+ Reply to Thread
Results 1 to 5 of 5

extract relevent data information in other cells

  1. #1
    Forum Contributor
    Join Date
    08-10-2006
    Posts
    723

    extract relevent data information in other cells

    hi,

    i have a wookbook that has codes in a range of cells. the codes could very in each cell evey time i run the macro

    there are 20 different codes and discriptions.

    each code has a description with it
    each code could repeat itself when i run the macro
    i want to be able to put the relevent discription once with the code even if the code has repeated itself

    ie

    a=apples
    b=beans
    p=pears
    etc

    a1 could have "a" in it
    a2 could have "a" in it
    a3 could have "b" in it
    a4 could have "p" in it

    i would like to see a matrix that just shows the code description once if the code is in the column a

    the codes in cell a1,a2,a3,a4 could change the next time i run the macro

    hope this helps
    thanks

    steve

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Why not set up a table on sheet 2 where column A was a b c d and column B was Apples, Bananas, Carrots and Dominoes etc
    then in column B (of Sheet 1) put
    =VLOOKUP(A1,Sheet2!$A$1:$B$20,2,TRUE)
    (enter the formula in B1 and formula-fill downwards as required)

    Any code in column A will be reflected correctly in column B

    hth
    ---

    Quote Originally Posted by stevekirk
    hi,

    i have a wookbook that has codes in a range of cells. the codes could very in each cell evey time i run the macro

    there are 20 different codes and discriptions.

    each code has a description with it
    each code could repeat itself when i run the macro
    i want to be able to put the relevent discription once with the code even if the code has repeated itself

    ie

    a=apples
    b=beans
    p=pears
    etc

    a1 could have "a" in it
    a2 could have "a" in it
    a3 could have "b" in it
    a4 could have "p" in it

    i would like to see a matrix that just shows the code description once if the code is in the column a

    the codes in cell a1,a2,a3,a4 could change the next time i run the macro

    hope this helps
    thanks

    steve
    Last edited by Bryan Hessey; 09-11-2006 at 10:46 PM.

  3. #3
    Forum Contributor
    Join Date
    08-10-2006
    Posts
    723

    extract relevent data information in the other cells

    hi,

    if possible i want only one of the codes and discriptions to appear apear at the bottom of the page. this will represent the others if more than one of the same code appeared
    ie if apples appeared 3 times.i want to only show it once

    hope this makes sence

  4. #4
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    As in the function provided by highlighting the data, then Data, Filter, Advanced Filter, Copy to another location, Unique Values only ?

    Quote Originally Posted by stevekirk
    hi,

    if possible i want only one of the codes and discriptions to appear apear at the bottom of the page. this will represent the others if more than one of the same code appeared
    ie if apples appeared 3 times.i want to only show it once

    hope this makes sence

  5. #5
    Forum Contributor
    Join Date
    08-10-2006
    Posts
    723

    extract relevent data

    hi,

    thanks bryan all working great

    steve

+ 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