+ Reply to Thread
Results 1 to 22 of 22

How to return 3 columns not adjacent to another worksheet with 2 criteria

  1. #1
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    How to return 3 columns not adjacent to another worksheet with 2 criteria

    Hi.

    I need to return 3 fields in a spreadsheet "Base" to a spreadsheet "Result" criteria based on 2 cell "E1: G2" (Worksheet named "Result")

    See file in:
    http://www.sendspace.com/file/1ksz0h

    Thank you!!
    Last edited by marreco; 10-24-2012 at 06:35 PM.
    "No xadrez nem sempre a menor dist?ncia entre dois pontos ? uma linha reta" G. Kasparov.

    If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select b from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: How to return 3 columns not adjacent to another worksheet with 2 criteria

    To Attach a File:

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.When you are in Advanced reply, click on the paperclip to open the upload window.

    View Pic

  3. #3
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: How to return 3 columns not adjacent to another worksheet with 2 criteria

    Hi.

    I had not posted before because the file had my file 1.16 MB
    I had to delete a few lines and guide

    Note: I need that feature either via VBA
    Thank you!
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: How to return 3 columns not adjacent to another worksheet with 2 criteria

    Hi
    Any idea?
    Thank you!!

  5. #5
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: How to return 3 columns not adjacent to another worksheet with 2 criteria

    Hello marreco,

    I have been working on this one for a long time, but have to go now.

    In the attached WorkBook, the Code works as long as you don't change the date for April. I will try to find a way for the Code to read the Date from the actual Cell when I have more time. Or maybe you or someone else can figure that out for me.

    Hope that gives you a start at least.
    Attached Files Attached Files
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  6. #6
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: How to return 3 columns not adjacent to another worksheet with 2 criteria

    Hi.
    I am grateful for the help.
    let's see if anyone else consigar further adjust the code.

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: How to return 3 columns not adjacent to another worksheet with 2 criteria

    Hi marreco

    Try the code in the attached...run from the Button.
    Let me know of issues.
    Attached Files Attached Files
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  8. #8
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: How to return 3 columns not adjacent to another worksheet with 2 criteria

    Hi.

    when I change the "name" value of G2, or E2 or F2.
    your code does not return more data.

    I am very grateful for your reply, thank you!

  9. #9
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: How to return 3 columns not adjacent to another worksheet with 2 criteria

    Hi marreco

    After you changed the value(s) did you click the Button?

  10. #10
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: How to return 3 columns not adjacent to another worksheet with 2 criteria

    yes!
    pressing the button, the data is clean and nothing is returned!

  11. #11
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: How to return 3 columns not adjacent to another worksheet with 2 criteria

    Hi marreco

    If you're working with the file I uploaded (3 Columns v1.xlsm) and you're selecting the values for E2, F2 and G2 from the Drop Downs in each of these cells and then click the Button and no data is being returned then I have no clue. I've tested the code throughly and it performs as expected on my platform.

    On the other hand, if you're working with a different file...

  12. #12
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: How to return 3 columns not adjacent to another worksheet with 2 criteria

    Hi. jaslake
    I used your file, and to test differently, I also created a new file with your code.

    yet the result was the same, returns nothing!

    I've never seen this kind of thing happens, it's the first time, very strange!

    thank you!

  13. #13
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: How to return 3 columns not adjacent to another worksheet with 2 criteria

    Hi marreco

    Please post your new file WITH code so I can SEE what's happening.

  14. #14
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: How to return 3 columns not adjacent to another worksheet with 2 criteria

    Hi.

    See file
    Attached Files Attached Files

  15. #15
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: How to return 3 columns not adjacent to another worksheet with 2 criteria

    Hi marreco

    The issue with the latest attachment is that Data Validation is missing in Cells E2, F2 and G2. I've revised the code such that Data Validation is applied to these three cells in the Workbook Open event. Let me know of issues.
    Attached Files Attached Files

  16. #16
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: How to return 3 columns not adjacent to another worksheet with 2 criteria

    Hi. First I am very happy for your effort to help!!

    I figured out what was wrong.

    in Brazil to date works in the following order: Day / Month / Year

    when I would select the dates in (format-Brazil), not pulling anything.

    02/01/2012 - 09/01/2012 so he understands that it is the month of February until the month of September. U.S.A.

    for me in Brazil is January 2nd ntil January 9th.

  17. #17
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: How to return 3 columns not adjacent to another worksheet with 2 criteria

    Hi marreco

    Is the problem solved?

  18. #18
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: How to return 3 columns not adjacent to another worksheet with 2 criteria

    Hi marecco,

    The attached WorkBook is my version of a solution to your "Problem". I hope you are happy with it.

    @ jaslake,

    It was very nice to have you aboard on this Thread, and what you have provided left me with envy. Very nice work and support, to say the least. I also really liked your Dropdown idea, which of course I have copied partially!

    Stay in touch.
    Attached Files Attached Files

  19. #19
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: How to return 3 columns not adjacent to another worksheet with 2 criteria

    @ Winon

    ...glad I could help. Thanks for the Rep. I've worked with marreco in the past and I can assure you...we're not done yet

  20. #20
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Re: How to return 3 columns not adjacent to another worksheet with 2 criteria

    Hi.
    Hi marreco

    Is the problem solved?
    Hi marecco,

    The attached WorkBook is my version of a solution to your "Problem". I hope you are happy with it.
    If I could merge the two, in the case of code Jaslake, the advantage is that I will not have formulas because my base is much higher than in my example.

    The advantage of your code is the way to enter dates tends me.

    Thank heart, the two who helped me!

    Thank you very much!

  21. #21
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: How to return 3 columns not adjacent to another worksheet with 2 criteria

    @ marreco

    You're welcome...glad I could help. Thanks for the Rep.

    @ Winon

    Guess I was wrong...yet again...

  22. #22
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: How to return 3 columns not adjacent to another worksheet with 2 criteria

    @ marreco

    You're welcome...glad I could help. Thanks for the Rep.

    @ jaslake,

    Guess I was wrong...yet again...
    Not at all! Don't be so hard on yourself. You have done great.

+ 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