+ Reply to Thread
Results 1 to 21 of 21

Retrieving the column data into a table based on a value in another sheet

  1. #1
    Forum Contributor
    Join Date
    08-02-2015
    Location
    Hyderabad
    MS-Off Ver
    2007
    Posts
    160

    Retrieving the column data into a table based on a value in another sheet

    Hi All,

    I've a requirement of copying the column data based on a value in another sheet where I've a table to display the data in a table.

    Ex: Assume that Karvy Supplies MF, Stock broking & Spandana supplies micro finance. Stock details will be entered in a sheet & next sheet I'll enter the supplier name so that data has to be retrieved from 1st sheet and have to display in a table.

    Please go through the attached files for your reference.

    I've used different formulas (as shown in the attached excels) like Offset, Vlookup, countif functions but everything is implementing someother logic

    This is for challan type where a supplier comes to me, our stock executive enter the details of supplier and goes to next sheet where he will enter the supplier name so that supplier details has to be retrieved from the 1st sheet and has to display in 2nd sheet based on this supplier name
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    08-02-2015
    Location
    Hyderabad
    MS-Off Ver
    2007
    Posts
    160

    Re: Retrieving the column data into a table based on a value in another sheet

    Could anyone please help me out in resolving this issue?

  3. #3
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: Retrieving the column data into a table based on a value in another sheet

    Hi laansesu,
    . - I do not think anyone can follow your explanation.
    . - I think a formula would be very difficult.
    . - A code solution should be possible.


    . How about this offer:

    . If you
    . 1 ) would consider a VBA code solution
    And
    ****. 2 ) Upload clear Before and After “Picture” or “Pictures” as well as your explanations so I can see exactly what you want.
    ( DO NOT POST IMAGES – Upload Files, or one File with example “Before” and “After” sheets)
    And
    . 3 ) No one else offers you a solution in the meantime
    Then
    I will try to give you a VBA code solution over the Week End
    .............................................


    ****

    . The Before or Befores, should look just as it / they does before running of any macro.
    .
    . The After or Afters, should be hand filled by you so that it they / looks exactly as you want it to After running of any macro, based on the actual sample data in the Before / or Befores
    . Make sure there is just enough data to demonstrate your need. Remember to desensitize the data if necessary, but use the typical Format type and choose your data carefully so that it can be used to test all possible scenarios.


    . Please remember this is a Free Forum, so you need to do your best to give us clear information to help us to help you.

    Alan
    Germany
    Last edited by Doc.AElstein; 08-14-2015 at 06:25 AM. Reason: Just Wanking about with the Formats
    '_- Google first, like this _ site:ExcelForum.com Gamut
    Use Code Tags: Highlight code; click on the # icon above,
    Post screenshots COPYABLE to a Spredsheet; NOT IMAGES PLEASE
    http://www.excelforum.com/the-water-...ml#post4109080
    https://app.box.com/s/gjpa8mk8ko4vkwcke3ig2w8z2wkfvrtv
    http://excelmatters.com/excel-forums/ ( Scrolll down to bottom )

  4. #4
    Forum Contributor
    Join Date
    08-02-2015
    Location
    Hyderabad
    MS-Off Ver
    2007
    Posts
    160

    Re: Retrieving the column data into a table based on a value in another sheet

    Dear Aelstein,

    Thanks for your reply. What has told me makes sense

    Please find the attached Before & After reports

    What has to be retrieved from 1st sheet is highlighted with yellow colour in the second sheet & even used reference in sheet2 reg column data of sheet1 that has to be retrieved.

    So please check and let me know if you still have any questions.
    Attached Files Attached Files

  5. #5
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: Retrieving the column data into a table based on a value in another sheet

    Hi
    Quote Originally Posted by laansesu View Post
    .....
    What has to be retrieved from 1st sheet is highlighted with yellow colour in the second sheet ...
    . I understand that
    .......................................



    Quote Originally Posted by laansesu View Post
    ..... even used reference in sheet2 reg column data of sheet1 that has to be retrieved.....
    . I think I understand that...
    . I beleive you mean that you used a formula to get that Info from the first sheet to make it clear from where the data is coming from. Correct ?

    .............................................

    . I still have no idea what you want. What do you want to happen?

    . 1 ) Should sheet 2 ( "GRNS" ) be updated every time a new row is added in sheet1 ( "RECEIPTS" ) ?

    . 2 ) If not, please try to explain

    . 2 a) what you want to happen.

    . 2 b) What should cause that to happen

    Alan

  6. #6
    Forum Contributor
    Join Date
    08-02-2015
    Location
    Hyderabad
    MS-Off Ver
    2007
    Posts
    160
    Quote Originally Posted by Doc.AElstein View Post
    Hi

    . I understand that
    .......................................




    . I think I understand that...
    . I beleive you mean that you used a formula to get that Info from the first sheet to make it clear from where the data is coming from. Correct ?

    .............................................

    . I still have no idea what you want. What do you want to happen?

    . 1 ) Should sheet 2 ( "GRNS" ) be updated every time a new row is added in sheet1 ( "RECEIPTS" ) ?

    . 2 ) If not, please try to explain

    . 2 a) what you want to happen.

    . 2 b) What should cause that to happen

    Alan
    Ues, what you have understood is perfect

    Point 1 you mentioned is what I meant, but based on criteria i.e., supplier name (highlighted in yellow) & even has to get address 1 & address 2 also

  7. #7
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: Retrieving the column data into a table based on a value in another sheet

    Quote Originally Posted by laansesu View Post
    ......
    Point 1 you mentioned is what I meant, but based on criteria i.e., supplier name (highlighted in yellow) & even has to get address 1 & address 2 also

    .. I still do not understand.

    . Please look at your uploaded Before ( Stock Details_Before.xlsx‎ )

    . I need to know exactly
    . (i) What
    and
    . (ii) Where
    do you type something in which should result in my code giving you the output you demonstrated in your After ( Stock Details_After.xlsx‎ )

    . you said ..
    Quote Originally Posted by laansesu View Post
    .......but based on criteria i.e., supplier name (highlighted in yellow) & even has to get address 1 & address 2 also
    ... If you require that the info highlighted in yellow in sheet GRNS is based on an input by you of a supplier name ( BGRS ) in cell D11 of sheet GRNS, then that should have been shown in your Before File thus:

    Before:

    Using Excel 2007
    Row\Col
    B
    C
    D
    E
    F
    G
    H
    I
    J
    7
    PURCHASE / JOBWORK
    DATE
    8
    SOURCE
    9
    M.F.N./ Supplier's Challan / Bill No :
    101
    INVOICE DATE
    30.12.2014
    10
    Inspection Report No:
    11
    Received the following from :
    BGRS
    12
    13
    Hyderabad
    14
    Sl.No.
    Description
    Unit
    Quantity
    Rejection
    Accepted
    15
    Asper Challan
    Actual Receipt
    R.M. Rejection
    Vendor Rejection
    Rate Rs.P
    16
    1
    17
    2
    GRNS

    ......

    Similarly your After should have looked like this:


    Using Excel 2007
    Row\Col
    B
    C
    D
    E
    F
    G
    H
    I
    J
    7
    PURCHASE / JOBWORK
    DATE
    17.08.2015
    8
    SOURCE
    9
    M.F.N./ Supplier's Challan / Bill No :
    101
    INVOICE DATE
    30.12.2014
    10
    Inspection Report No:
    11
    Received the following from :
    BGRS
    12
    Kukatpally
    Surajnagar
    13
    Hyderabad
    14
    Sl.No.
    Description
    Unit
    Quantity
    Value
    Discount
    15
    Asper Challan
    Actual Receipt
    Rate Rs.P
    Net Amount
    16
    1
    Rotor
    1
    700
    500
    6000
    240
    5760
    6048
    17
    2
    Stator
    2
    5000
    4000
    90000
    4500
    90000
    91800
    18
    3
    19
    4
    GRNS

    .......

    If this is not the case, please re produce carefully your Before and After to correctly reflect your requirement.!!!

    Alan
    P.s.
    (iii) Note also: Your sheets for GRNS are have different formats in the Before and After !!!!

  8. #8
    Forum Contributor
    Join Date
    08-02-2015
    Location
    Hyderabad
    MS-Off Ver
    2007
    Posts
    160

    Re: Retrieving the column data into a table based on a value in another sheet

    Dear Alan,

    Whatever you shown in the picture is perfect i.e., If I type BGRS in sheet2/GRNS Sheet (as shown in your screenshot1) then its relative data has to be appeared in the below table which has been highlighted (with yellow) in your screenshot2.

    I think above details makes sense for you

  9. #9
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: Retrieving the column data into a table based on a value in another sheet

    Quote Originally Posted by laansesu View Post
    Dear Alan,

    Whatever you shown in the picture is perfect i.e., If I type BGRS in sheet2/GRNS Sheet (as shown in your screenshot1) then its relative data has to be appeared in the below table which has been highlighted (with yellow) in your screenshot2.

    I think above details makes sense for you
    .. so which of the two files you sent shall I use??? As I mentioned
    Quote Originally Posted by Doc.AElstein View Post
    ........
    P.s.
    (iii) Note also: Your sheets for GRNS are have different formats in the Before and After !!!!
    ......the two files had different formats so I must know to which File the code should apply. - Any Code I do for you will not work on two different Files

  10. #10
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: Retrieving the column data into a table based on a value in another sheet

    Hi. Laansesu,
    . Ok, how about this to be going in with...

    Start.... ( BEFORE )

    Using Excel 2007
    Row\Col
    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    L
    M
    N
    O
    P
    Q
    R
    S
    T
    U
    V
    W
    X
    Y
    Z
    AA
    AB
    AC
    AD
    AE
    AF
    AG
    AH
    AI
    AJ
    AK
    6
    1120122014
    1KRR01
    1
    20.12.2014
    101
    800
    30.12.2014
    YAP
    BGRS
    Kukatpally
    Surajnagar
    Hyderabad
    1
    KRR01
    Rotor
    500
    700
    0
    500
    12
    6000
    240
    5760
    288
    600
    180
    6048
    12.096
    288
    7
    2130122014
    1KRAS1
    1
    30.12.2014
    101
    900
    30.12.2014
    YAP
    BGRS
    Kukatpally
    Surajnagar
    Hyderabad
    2
    KRAS1
    Stator
    5000
    0
    5000
    0
    4000
    22.5
    90000
    4500
    90000
    1800
    0
    91800
    18.36
    1800
    8
    1230122014
    2KRAI1
    2
    30.12.2014
    102
    901
    30. Dez
    ACAST
    Alucast
    SR Nagar
    Sri Nagar Colony
    Hyderabad
    1
    KRAI1
    Canopy
    8000
    8000
    0
    7000
    66
    462000
    2000
    462000
    9240
    0
    471240
    58.905
    9240
    RECEIPTS


    Using Excel 2007
    Row\Col
    B
    C
    D
    E
    F
    G
    H
    I
    J
    11
    Received the following from :
    12
    13
    Hyderabad
    14
    Sl.No.
    Description
    Unit
    Quantity
    Value
    Discount
    15
    Asper Challan
    Actual Receipt
    Rate Rs.P
    Net Amount
    16
    1
    17
    2
    18
    3
    19
    4
    20
    5
    21
    6
    GRNS

    ...............................

    AFTER putting BGRS in cell D11

    Using Excel 2007
    Row\Col
    B
    C
    D
    E
    F
    G
    H
    I
    J
    11
    Received the following from :
    BGRS
    12
    Kukatpally
    Surajnagar
    13
    Hyderabad
    14
    Sl.No.
    Description
    Unit
    Quantity
    Value
    Discount
    15
    Asper Challan
    Actual Receipt
    Rate Rs.P
    Net Amount
    16
    1
    Rotor
    1
    700
    500
    6000
    240
    5760
    6048
    17
    2
    Stator
    2
    5000
    4000
    90000
    4500
    90000
    91800
    GRNS

    .............................................

    Code to do the above in next Post, Post # 11

  11. #11
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: Retrieving the column data into a table based on a value in another sheet

    ....

    Code for Post # 10 above

    Please Login or Register  to view this content.

    Note:
    . This is a “Worksheets Change” Program. It starts automatically when you type a new entry in cell D11
    . It must be placed in the worksheet “GRNS” Module, not a Normal Macro Module.
    . To do that...

    . 1 ) Copy the code complete to the clipboard.
    . 2 ) Right mouse click on a GRNS sheet tab
    . 3 ) select an option something like “Show Code” ( I do not know exact English wording as my Excel is German )
    . 4 ) You should now see the VB Development Environment Window shown.
    . 5 ) Paste in the code in the large Empty code Window that.
    . 6 ) Hit Alt + F11 to get out of the VB Development Window and back into “normal” Excel Spreadsheet Window
    . 7 ) Resave your file, but select the ( usually second ) option of something like “Excel Workbook with Macros”
    . 8 ) That is it. The code should then always start when you type an entry in cell D11

    ..........................................
    . Please let me know how you get on.
    Alan

  12. #12
    Forum Contributor
    Join Date
    08-02-2015
    Location
    Hyderabad
    MS-Off Ver
    2007
    Posts
    160

    Re: Retrieving the column data into a table based on a value in another sheet

    Hey Sorry once again..I'm not getting what I exactly required to do. Request you to please check and do the needful.

    Difficulties I'm facing is whenever I entering the data in each cell,

    When I started typing details in Receipts sheet cells I'm getting pop-up msg that "That was not an entry in D11". When I completed typing all details in receipts sheet ignring the above msg, I'm going to GRNS sheet and entered the supplier name in D11. I couldnt see any data being appeared in the table.

    Request you to Please clarify on this.

  13. #13
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: Retrieving the column data into a table based on a value in another sheet

    Hi laansesu......
    Quote Originally Posted by laansesu View Post
    .....
    When I started typing details in Receipts sheet cells I'm getting pop-up msg that "That was not an entry in D11". When I completed typing all details in receipts sheet ignring the above msg, I'm going to GRNS sheet and entered the supplier name in D11. I couldnt see any data being appeared in the table.......
    ... It sounds like you copied the Code to the wrong sheet Module, - It sounds like you copied the Code into The RECEIPTS Module. It should be copied to the GRNS Sheet module....

    Quote Originally Posted by Doc.AElstein View Post
    ........
    Note:
    . This is a “Worksheets Change” Program. It starts automatically when you type a new entry in cell D11
    . It must be placed in the worksheet “GRNS” Module, not a Normal Macro Module.
    . To do that...

    . 1 ) Copy the code complete to the clipboard.
    . 2 ) Right mouse click on a GRNS sheet tab
    . 3 ) select an option something like “Show Code” ( I do not know exact English wording as my Excel is German )
    . 4 ) You should now see the VB Development Environment Window shown.
    . 5 ) Paste in the code in the large Empty code Window that.
    . 6 ) Hit Alt + F11 to get out of the VB Development Window and back into “normal” Excel Spreadsheet Window
    . 7 ) Resave your file, but select the ( usually second ) option of something like “Excel Workbook with Macros”
    . 8 ) That is it. The code should then always start when you type an entry in cell D11
    .........
    Alan

  14. #14
    Forum Contributor
    Join Date
    08-02-2015
    Location
    Hyderabad
    MS-Off Ver
    2007
    Posts
    160

    Re: Retrieving the column data into a table based on a value in another sheet

    Really Very Sorry for my mistake..even now getting the same message after pasting the same code in GRNS Sheet code (nor) getting the data from receipts sheet into the table

    Please clarrify this and do the needful.

  15. #15
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: Retrieving the column data into a table based on a value in another sheet

    Quote Originally Posted by laansesu View Post
    Really Very Sorry for my mistake..even now getting the same message after pasting the same code in GRNS Sheet code (nor) getting the data from receipts sheet into the table

    Please clarrify this and do the needful.
    . Have you also deleted the code from the RECEIPTS Worksheet module?

    . The code must only be in GRNS Worksheet module.
    . There must be no code in the RECEIPTS Worksheet module

  16. #16
    Forum Contributor
    Join Date
    08-02-2015
    Location
    Hyderabad
    MS-Off Ver
    2007
    Posts
    160

    Re: Retrieving the column data into a table based on a value in another sheet

    Yes, I've deleted the code in GRNS Work Sheet Module & I'm now getting this message when I entered the supplier name in GRNS Sheet

  17. #17
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: Retrieving the column data into a table based on a value in another sheet

    Quote Originally Posted by laansesu View Post
    Yes, I've deleted the code in GRNS Work Sheet Module & I'm now getting this message when I entered the supplier name in GRNS Sheet
    ??? The code must be in the GRNS Module .
    .You must have no code in RECEIPTS Worksheet Module

  18. #18
    Forum Contributor
    Join Date
    08-02-2015
    Location
    Hyderabad
    MS-Off Ver
    2007
    Posts
    160

    Re: Retrieving the column data into a table based on a value in another sheet

    I dont know whats confusing me?? Really very sorry I've deleted in receipts work sheet module not in GRNS module.

    Now, I've code in GRNS Module & deleted code in Receipts module.

  19. #19
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: Retrieving the column data into a table based on a value in another sheet

    Quote Originally Posted by laansesu View Post
    I dont know whats confusing me?? Really very sorry I've deleted in receipts work sheet module not in GRNS module.

    Now, I've code in GRNS Module & deleted code in Receipts module.
    ?? So is it now working??

    . Are you still haveing problems?

  20. #20
    Forum Contributor
    Join Date
    08-02-2015
    Location
    Hyderabad
    MS-Off Ver
    2007
    Posts
    160

    Re: Retrieving the column data into a table based on a value in another sheet

    Its not working.

    Issues I found are: 1. I'm getting error ("that was not an entry in D11") in GRNS Module when I entered supplier name
    2. I'm not able to get the required data from Receipts Module when I entered supplier name in GRNS Module

  21. #21
    Forum Expert Doc.AElstein's Avatar
    Join Date
    05-23-2014
    Location
    '_- Germany >Outside Building things.... Mostly
    MS-Off Ver
    Office 2003 2007 2010 PC but Not mac. XP and Vista mostly, sometimes Win 7
    Posts
    3,618

    Re: Retrieving the column data into a table based on a value in another sheet

    Quote Originally Posted by laansesu View Post
    Its not working.
    ......

    Hi
    It is still working by me!
    It is difficult to guess at this distance what the problem may currently be.
    .. If you wish, I can take a look at your file......So send me it to me

    . If you wish to send the file to me: You have 3 ways to do this:

    To Post Files

    . 1) To Attach a sample workbook: ( As you did before in Post # 4 - So you already know how to do that)
    View Pic
    http://www.excelforum.com/excel-prog...ch-a-file.html
    http://tinyurl.com/oenwprw

    . 2) Send over a file sharing site, such as this free thing
    Box Net,
    https://www.box.com/
    http://tinyurl.com/7chr7u8
    . Remember to select Share and give the link / links they give.

    . 3) Only as a last resort, P.M **( Private Message ) . me and i will reply with my Email Addressee so you can send me a file
    ** To PM me, click on my name in the left hand margin when you are logged in, the rest should be obvious.

    Alan
    Last edited by Doc.AElstein; 08-23-2015 at 07:58 AM.

+ 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: 1
    Last Post: 03-18-2015, 07:23 PM
  2. Update table on another sheet with information on ACTIVE SHEET based on column search.
    By keelinglee in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-14-2014, 09:06 PM
  3. [SOLVED] Fill a cell in Column B based on the text in Column A using a table on sheet 2
    By lbrasfie in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-25-2013, 01:56 PM
  4. retrieving a table of info based on a value
    By shaynaO in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 04-26-2013, 12:35 AM
  5. Replies: 1
    Last Post: 04-04-2013, 02:47 PM
  6. Retrieving value from another sheet based on column
    By kookymonster in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-24-2011, 02:59 PM
  7. Replies: 0
    Last Post: 08-25-2005, 02:15 AM

Tags for this Thread

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