+ Reply to Thread
Results 1 to 3 of 3

Data Extract from Rows

  1. #1
    Registered User
    Join Date
    08-31-2011
    Location
    Karnal
    MS-Off Ver
    Excel 2003
    Posts
    22

    Data Extract from Rows

    Hi All,

    I have a MS Excel 2010 worksheet with multiple columns and rows. If Col. A data match with Header row then pick the cell value from Col. B and paste into this column. Then fill colour this row in whole worksheet. Please see the attachment.

    Thanks in advance.
    Attached Images Attached Images

  2. #2
    Registered User
    Join Date
    08-27-2011
    Location
    South Carolina, USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Data Extract from Rows

    if I understand your intention correctly, you want to fill the number of people who signed up for each subject for each school. The data is on Col A and Col B.

    you may try the following code. Note this is a partial code which can be inserted into your main code. I didn't debug the code because I don't have your data file.

    -------

    for i = 2 to 22 ' or whatever the last row on your list.

    data_sub = cells(i, 1).value
    if data_sub = "" then
    title_line = i;
    goto 100
    endif


    for j = 5 to 14
    if data_sub = cells(1, j).value then
    cells(title_line, j).value = cells(i, 2).value;
    endif

    next j

    100 continue

    next i
    --------------

  3. #3
    Registered User
    Join Date
    08-31-2011
    Location
    Karnal
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Data Extract from Rows

    Hi onrock,

    Thanks for your response.... I have attached the data file......


    Quote Originally Posted by onrock View Post
    if I understand your intention correctly, you want to fill the number of people who signed up for each subject for each school. The data is on Col A and Col B.

    you may try the following code. Note this is a partial code which can be inserted into your main code. I didn't debug the code because I don't have your data file.

    -------

    for i = 2 to 22 ' or whatever the last row on your list.

    data_sub = cells(i, 1).value
    if data_sub = "" then
    title_line = i;
    goto 100
    endif


    for j = 5 to 14
    if data_sub = cells(1, j).value then
    cells(title_line, j).value = cells(i, 2).value;
    endif

    next j

    100 continue

    next i
    --------------
    Attached Files Attached Files

+ 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