+ Reply to Thread
Results 1 to 4 of 4

Copy cells from another sheet depending on category

Hybrid View

  1. #1
    Registered User
    Join Date
    04-14-2013
    Location
    Scotland
    MS-Off Ver
    Excel 2013
    Posts
    1

    Copy cells from another sheet depending on category

    Hi I'm new here, unfortunately I won't be able to offer much help to others


    I'm looking for a formula where a column can grab information from another sheet depending on the value of a corresponding value.

    I have a list of all our sports club members and each fall into different categories - Child, Student, Adult and Senior.

    I want to have a separate sheet for each category so the formula needs to look up the category and return the names from the corresponding cell.

    I assume there is a straight forward formula but i cant seem to find it.

    Many Thanks

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copy cells from another sheet depending on category

    I do not think a formula can create a separate sheet. A formula can only return a value. What you need is code, or macro. I can help if you could attach your sample. To attach a sample, go to advance then attachment.

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Copy cells from another sheet depending on category

    Perhaps this would be possible with an Array formula, but without a sample workbook we can not work..
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Copy cells from another sheet depending on category

    Here's a formula method.

    Let's assume this is your data on a sheet named Data in the range A2:B15:

    Name1.....Child
    Name2.....Student
    Name3.....Adult
    Name4.....Adult
    Name5.....Senior
    Name6.....Senior
    Name7.....Adult
    Name8.....Adult
    Name9.....Adult
    Name10...Child
    Name11...Senior
    Name12...Student
    Name13...Student
    Name14...Adult

    Create a sheet for each of the categories.

    On each sheet enter these column headers:

    A1: Category
    B1: Count
    C1: Name

    In cell A2 enter the category for that particular sheet. For example, on the Child sheet enter Child as the category in cell A2.

    Enter this formula in B2. This will return the count of records for the particular category.

    =COUNTIF(Data!B:B,A2)

    Enter this array formula** in C2. This will list the names for the category.

    =IF(ROWS(C$2:C2)>B$2,"",INDEX(Data!A:A,SMALL(IF(Data!B$2:B$15=A$2,ROW(Data!B$2:B$15)),ROWS(C$2:C2))))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Copy down until you get blanks.

    Here's a sample file that demonstrates this:

    Lemac.xlsx
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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