+ Reply to Thread
Results 1 to 8 of 8

Need help with fairly simple VBA coding

  1. #1
    Registered User
    Join Date
    04-28-2016
    Location
    Peterborough, England
    MS-Off Ver
    Excel 2010
    Posts
    4

    Need help with fairly simple VBA coding

    Hi everyone,

    new to this forum and am after some help from some of you VBA wizards.
    Basically what I am trying to do it create a macro that automatically updates a 'master' sheet that will show me what criteria has been met on the 10+ other worksheets in the workbook.

    In Column C on every worksheet there is a blank cell which when filled with the number 1 needs to then show that whole row on the 'master sheet' as this '1' shows the project as completed. I would like the macro to find all the rows within the workbook that meet this criteria and show the row of information links to that '1' in the 'master' sheet. I do not want any blank rows on the master sheet either so if it doesn't meet the criteria is stays where it is.

    Hope this is clear if not ill try and help just as I hope you guys will me.

    Best Regards,

    Jack

  2. #2
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,098

    Re: Need help with fairly simple VBA coding

    Hello Jack,

    In a standard module, try the following code:-


    Please Login or Register  to view this content.
    It filters on Column C for the number 1 and transfers the relevant row of data to the Master sheet.

    I don't know how many columns that you are using but, in the code, change "H" to suit yourself.

    I hope that this helps.

    Cheerio,
    vcoolio.

  3. #3
    Registered User
    Join Date
    04-28-2016
    Location
    Peterborough, England
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Need help with fairly simple VBA coding

    Hi Vcoolio,

    Thank you very much for your reply, however it doesn't seem to do anything? I am fairly new to VBA so you may have to break this down to a sort of idiots guide do I have to change anything in the code above that will be specific to my spreadsheet?

    Many thanks again,
    Jack

  4. #4
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,098

    Re: Need help with fairly simple VBA coding

    Hello Jack,

    For whatever reason, the file uploader on this site isn't working for me so following is the link to my test work book for you to peruse:-

    https://www.dropbox.com/s/dannju9w25...t%29.xlsm?dl=0

    You'll see that if you place the number 1 in any cell in Column C of any sheet, and then click on the "Consolidate" button in the Master sheet, all relevant rows of data will be transferred to the Master sheet.

    Without seeing your actual work book, I'm assuming that yours has a similar set out to the test work book. If not, please upload a sample of your work book so that we can see why the code doesn't appear to work for you. Be careful with any sensitive data.

    Cheerio,
    vcoolio.

  5. #5
    Registered User
    Join Date
    04-28-2016
    Location
    Peterborough, England
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Need help with fairly simple VBA coding

    Hi Vcoolio,

    Getting there now, I have tried with my spreadsheet to input the data and failed.
    I have attached my spreadsheet, could you give it a go I seem to be doing something wrong.

    Every so greatful for your help thank you so much.

    Best Regards,
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,098

    Re: Need help with fairly simple VBA coding

    Hello Jack,

    The reason its not working is because you have placed the code in the work sheet module instead of a standard module. Place it in a standard module by:-

    - Press Alt +F11
    - Select Insert > Module
    - Paste the code.

    Back in the Master sheet, right click on the button, select "assign code" then select the code name, click OK.

    However, I've just been playing around a little with the code and think that you may like the following version better:-


    Please Login or Register  to view this content.
    It does the same job but also places the source sheet name in Column G (change to suit yourself) in the Master sheet.

    Following is the link to the updated test work book (based on the one you supplied):-

    https://www.dropbox.com/s/5t4zhc9jv8...ter2.xlsm?dl=0

    This site's file uploader still doesn't work for me.

    Anyway, I hope that this sorts it out for you.

    Cheerio and goodnight.
    vcoolio.

  7. #7
    Registered User
    Join Date
    04-28-2016
    Location
    Peterborough, England
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Need help with fairly simple VBA coding

    Absolute Legend! Thank you so much!

  8. #8
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,098

    Re: Need help with fairly simple VBA coding

    Hello Jack,

    Glad that I could help.
    Goodluck.

    Cheerio,
    vcoolio.

+ 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. Fairly simple IF/THEN command?
    By chessman in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-15-2016, 01:52 PM
  2. VBA IF Problem (Fairly Simple)
    By LewisLonsdale in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-08-2015, 02:29 PM
  3. Help, Formula Won't Carry Through
    By dyzfunctioned in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-25-2013, 01:50 PM
  4. Fairly Simple Formula Question- Any help?
    By Hizuremai in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-03-2012, 12:22 PM
  5. Fairly simple, but need help.
    By littlcor in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-23-2006, 03:02 AM
  6. [SOLVED] HELLLP!!!! This should be fairly simple I would think!
    By InfinityDesigns in forum Excel General
    Replies: 7
    Last Post: 06-18-2005, 11:05 PM

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