+ Reply to Thread
Results 1 to 7 of 7

Need vba code to pull data across sheet depends upon command button click

  1. #1
    Forum Contributor
    Join Date
    07-21-2011
    Location
    Bangalore,India
    MS-Off Ver
    Excel 2007,2010,2016
    Posts
    695

    Need vba code to pull data across sheet depends upon command button click

    Hi experts

    I have set of data in two sheet, i want copy data from 2 sheet , paste into corresponding value sheet name, through multiple command buttons


    for e.g
    Condition 1 : Rawsheet1 Column B have data south and Rawsheet2 Column B have data south, from both sheet all data south copy to south sheet, 1st range(A30:G30) 2ND RANGE(I30:O30)
    Condition 2 : In sheet south In column C have states data when i click state wise command button corresponded states data will be in both range
    please find the attachment
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,308

    Re: Need vba code to pull data across sheet depends upon command button click

    Uneccessaily "complex": use a simple drop down (one per "Region" i.e South, East) to select the state rather than have multiple command button macros.

    Abd do you really need "separate "Region" sheets than a single report based on the selected region? and are we cater for all regions ?

    And "Count of State" ..... number of records per state?

    Keep it simple!
    Last edited by JohnTopley; 07-01-2022 at 07:59 AM.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Forum Contributor
    Join Date
    07-21-2011
    Location
    Bangalore,India
    MS-Off Ver
    Excel 2007,2010,2016
    Posts
    695

    Re: Need vba code to pull data across sheet depends upon command button click

    Yes even i think its really complicated to view report if too many buttons here and there i want make simple only all report East and south data from both sheet

    can u do once click all report button onlly east and south data fill range?

    please find attachment
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,308

    Re: Need vba code to pull data across sheet depends upon command button click

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by JohnTopley; 07-01-2022 at 10:03 AM.

  5. #5
    Forum Contributor
    Join Date
    07-21-2011
    Location
    Bangalore,India
    MS-Off Ver
    Excel 2007,2010,2016
    Posts
    695

    Re: Need vba code to pull data across sheet depends upon command button click

    Hi sir it works perfectly, i try same code for my sake it show error i try to implant code for state column c:c but i getting error can u help to learn where did i made mistake?
    Attached Images Attached Images

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,308

    Re: Need vba code to pull data across sheet depends upon command button click

    Please Login or Register  to view this content.
    Added Data Validation list for selections
    Attached Files Attached Files
    Last edited by JohnTopley; 07-04-2022 at 02:36 AM.

  7. #7
    Forum Contributor
    Join Date
    07-21-2011
    Location
    Bangalore,India
    MS-Off Ver
    Excel 2007,2010,2016
    Posts
    695

    Re: Need vba code to pull data across sheet depends upon command button click

    Thanks Master my dream come true!! solved

+ 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. [SOLVED] Copying ActiveX Command Button from master sheet to subsheets. command button code missing
    By popper08 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-13-2020, 10:15 AM
  2. [SOLVED] Pull data from another workbook using dropdown or command button to those sheet name VBA
    By rajeshn_in in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-30-2017, 07:33 AM
  3. VBA Code does not respond to a single click of command button
    By Buddy8 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-18-2016, 06:00 PM
  4. What is the another code to allow the other command button to click?
    By iqballud in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-22-2014, 01:34 AM
  5. Code a Command Button on UserForm not to close upon click - Excel VBA
    By eemiller1997 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 12-14-2012, 02:20 PM
  6. Click a command button with code
    By h_aesa1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-14-2009, 11:03 AM
  7. Command button click code
    By mqdias in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-07-2007, 05:31 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