+ Reply to Thread
Results 1 to 9 of 9

Search Value of column E if exist return value of column B put result in column P

  1. #1
    Forum Contributor
    Join Date
    06-15-2012
    Location
    beirut
    MS-Off Ver
    Excel 2007
    Posts
    212

    Search Value of column E if exist return value of column B put result in column P

    Dear All : i have sheet1 have Column B the name of student and column E their Marks .
    i need a code to get all students name have Marks in column E , between two value ( greater than value in G1 and Less than value in H1 ) ie search all Marks in column E if the value greater than value in G1 and Less than value in H1 , then put the result in column P , started from P2 .

    see attached file .

    Thanks in advanced
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Search Value of column E if exist return value of column B put result in column P

    Hi

    Try this code:

    Please Login or Register  to view this content.
    Grade of Student -.xlsm
    Click *, if my suggestion helps you. Have a good day!!

  3. #3
    Forum Contributor
    Join Date
    06-15-2012
    Location
    beirut
    MS-Off Ver
    Excel 2007
    Posts
    212

    Re: Search Value of column E if exist return value of column B put result in column P

    Thanks a lot jraj1106 for your help, this Macro what i need , but i still have a problem that is
    1-if i press two times or three times on command button, the Macro give me the result two times and three times below other, what i need , when i press more than one time on command button the result one time begin as new after each press and not conteniously.
    2- i have in Column S Grade Letters ( A,B,C,D,E,F, ext .. ) and in Column T the value of Each Letters ( 95,90,85,80,50,40 and Ext ... ) i need from you a Code , if i type a letter F in cell L1, the Code should search the column E for Value of Grade F ie ( Less or equal 40 ), and put the result in column Q .
    see attched file
    many thanks for your help Mr. Jarj1006
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Search Value of column E if exist return value of column B put result in column P

    Hi.

    Happy to help you. The modified code is below:

    Grade of Student -.xlsm


    If solved please click the star below and also mark the thread as SOLVED.

    Good day..

  5. #5
    Forum Contributor
    Join Date
    06-15-2012
    Location
    beirut
    MS-Off Ver
    Excel 2007
    Posts
    212

    Re: Search Value of column E if exist return value of column B put result in column P

    Dear jarj1106 , thanks for your attention, but i still have some problem :
    1-Code just work with Grade F in cell L1 , but other Grade ( A,B,C,D,E, ext in column S ) not working , i mean column S ( from S2:S1000 as example is the range of Grade ) and the column T ( from T2:T1000 as example ) is the Value of Letter adjacent in column S.
    2- if i press the command button Grade many times i want the result one time , if i Re-press the command button again i want the result start from cell P2 , and cell S2 ( over the old result first press ) as new result , and not double the result below first result . i mean when i press the command button many times the code should get the result as first press and result should always begin from 2nd row ( P2 , and S2 ) .
    see new attached file

    Thanks a lot jarj1106
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Search Value of column E if exist return value of column B put result in column P

    Sorry could you explain the conditions for this part:

    Code just work with Grade F in cell L1 , but other Grade ( A,B,C,D,E, ext in column S ) not working , i mean column S ( from S2:S1000 as example is the range of Grade ) and the column T ( from T2:T1000 as example ) is the Value of Letter adjacent in column S.
    You said in the file: if L1=F then show values from col E <=40. But what abt A,B,C,D,E. What's the condition for them?

    Sorry didn't understand that part. The second part has been fixed.

    Grade of Student -.xlsm
    Last edited by jraj1106; 02-22-2013 at 01:08 PM.

  7. #7
    Forum Contributor
    Join Date
    06-15-2012
    Location
    beirut
    MS-Off Ver
    Excel 2007
    Posts
    212

    Re: Search Value of column E if exist return value of column B put result in column P

    Dear jraj1106 :
    i mean each Letter of Grade in column S2:S10000 ( A,B,C,D ext ... ) has a value in column T2:T10000 ( 95,90,85,80,ext ...) , so each cell in column S has value in adjacent cell in coulmn T ,( A=95,B=90,C=85,D=80,E=50 ext .... ) or lets say ( cell S2= value in cell T2 , and cell S3 = value in cell T3 and S4= value in cell T4 ,ext ... ), so when i type any Letter ,(lets say letter A ) in cell L1 the value i want to search in column E is 95 and Less , and if i type the letter C in cell L1 the value i want to search in column E is 85 and Less , then give result of all names in column B that has value in column E Less than value of cell L1 , and put the result in Column Q ,
    also, i want when i press the command button the result start Q2 and P2, because i don't want duplicate the result if i press on command button twice ( 2 times ).
    please send me the file with the code .
    i'm very thankfull jarj1106 for your attention.

  8. #8
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Search Value of column E if exist return value of column B put result in column P

    Hi.

    Try this:

    Grade of Student -.xlsm

  9. #9
    Forum Contributor
    Join Date
    06-15-2012
    Location
    beirut
    MS-Off Ver
    Excel 2007
    Posts
    212

    Re: Search Value of column E if exist return value of column B put result in column P

    Many Thanks Mr. jraj1106, that is the code what i want, it works perfectly.

    Thanks again for your help.

+ 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