+ Reply to Thread
Results 1 to 11 of 11

VBA to fetch data from next sheet using command button

  1. #1
    Registered User
    Join Date
    04-17-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    34

    VBA to fetch data from next sheet using command button

    Hi ,

    Please find attached sample.

    I am trying to write a VBA code where once I click the command button it should fetch data from sheet 2 and give the exact number in sheet 1.

    Kindly let me know if you need any more input in understanding the problem.

    Thanks,
    Daniel
    Attached Files Attached Files

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: VBA to fetch data from next sheet using command button

    Looking for VBA code alone or formula suggestion is acceptable?


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    04-17-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: VBA to fetch data from next sheet using command button

    I tried formula but it is not helping, but anything is ok as long as it meets the requirement. thanks for ur help.

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: VBA to fetch data from next sheet using command button

    In A3 Cell
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Drag it right...

    In K3 Cell
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Drag it right...

    The above formula's not taken the Condition & Status in consideration. Some of your header data in sheet1 cells have extra spaces, please remove it.

  5. #5
    Registered User
    Join Date
    04-17-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: VBA to fetch data from next sheet using command button

    If i click the command button the data should automatically get updated in the respective cells and I think that can't be done with the formula you gave. Sorry if I made you misunderstood something here.

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: VBA to fetch data from next sheet using command button

    No problem and I am unable to understand why you need command button here since the forumla's will get auto updated whenever any change in the source data.

  7. #7
    Registered User
    Join Date
    04-17-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: VBA to fetch data from next sheet using command button

    Actually in real scenario the data is so huge and in single click all the data should get updated for example the logic you gave on cell A3 and K3 as well as I have to add few more logic and everything should get update on one click of the command button thats the reason I asked for a VBA code instead of formula.

  8. #8
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: VBA to fetch data from next sheet using command button

    Dani thanks for the explanation, but I am not seeing any need for going to vba solution since the example you shown me is just getting floated in that allocated columns alone and you are just getting the count and sum from it. If possible clarify me the need by showing the data, possibly me too can offer you the VBA code

  9. #9
    Registered User
    Join Date
    04-17-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: VBA to fetch data from next sheet using command button

    I can't share the data due to some confidential info but the sample sheet is having all the required information, kindly if possible create a VBA code for that scenario so that I can add up more on the same.

  10. #10
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: VBA to fetch data from next sheet using command button

    Please never post any confidential data, we just require xyz of data to understand the logic alone. Sorry I am unable to understand the need of vba so I hope someone will take care of this thread.

  11. #11
    Registered User
    Join Date
    04-17-2013
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: VBA to fetch data from next sheet using command button

    Ok thanks a lot sixth sense...I really appreciate your quick response and detailed explanations.

+ 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