+ Reply to Thread
Results 1 to 15 of 15

Find cells contents elsewhere & 2 Buttons to copy a set of cells.

  1. #1
    Valued Forum Contributor
    Join Date
    11-12-2014
    Location
    Nottingham
    MS-Off Ver
    2013
    Posts
    383

    Arrow Find cells contents elsewhere & 2 Buttons to copy a set of cells.

    Hi!

    I have a few 'little' challenges... I have attached a template spreadsheet so that you can see what I am already working with... 2014-2015 Planning template.xlsm

    Challenge 1: I would like a button in J1 or J2 that will search for today's date (currently in J1) in column B and select it so that the week that today is in, is visible in the window.


    Challenge 2: I would like 2 buttons called "Week A" and "Week B" in K1 and K2 that copy the respective weeks timetable from sheet 2 into sheet 1 at the bottom.


    This will make a stressed teachers life so much simpler!

    Many thanks in advance and I hope this all makes sense!!

    ARowbot
    Last edited by ARowbot; 03-18-2015 at 03:13 PM.

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Find cells contents elsewhere & 2 Buttons to copy a set of cells.

    Not sure I follow you, but see if this gets you started.

    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    11-12-2014
    Location
    Nottingham
    MS-Off Ver
    2013
    Posts
    383

    Re: Find cells contents elsewhere & 2 Buttons to copy a set of cells.

    Thanks for the reply...!

    Hopefully I can clear up what I mean...

    I'd like a button that I can click so that it automatically scrolls down to today's date (or the week that it is in). Rather than me scrolling down manually.

    Secondly 2 separate buttons that will Copy the appropriate week from sheet 2 onto the bottom.

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Find cells contents elsewhere & 2 Buttons to copy a set of cells.

    Did you test the code too see if does any of what you want?

  5. #5
    Valued Forum Contributor
    Join Date
    11-12-2014
    Location
    Nottingham
    MS-Off Ver
    2013
    Posts
    383

    Re: Find cells contents elsewhere & 2 Buttons to copy a set of cells.

    I have tried it...I Can sort of see how it should work but I can't make it work alongside the current macros in there!

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Find cells contents elsewhere & 2 Buttons to copy a set of cells.

    Does the messagebox depict what you are trying to do as far as finding the value of J1? It is incomplete until I know what you'd like to do after that.

  7. #7
    Valued Forum Contributor
    Join Date
    11-12-2014
    Location
    Nottingham
    MS-Off Ver
    2013
    Posts
    383

    Re: Find cells contents elsewhere & 2 Buttons to copy a set of cells.

    I originally got it working to come up with a dialogue box saying Week B. But now it seems to have no impact at all...

    EDIT: I now have the macro as controlled by a button and it returns "Week B". However I cannot see how this is related to today's date...

    I have included a more accurate template to work with...2014-2015 Planning template.xlsm
    Last edited by ARowbot; 03-16-2015 at 05:47 PM.

  8. #8
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Find cells contents elsewhere & 2 Buttons to copy a set of cells.

    Try this and see if were getting any closer too what you want. BTW Today() is a horrible name for a Sub. I suggest you revise it. You should never name a sub after a normal xl Function.
    Attached Files Attached Files

  9. #9
    Valued Forum Contributor
    Join Date
    11-12-2014
    Location
    Nottingham
    MS-Off Ver
    2013
    Posts
    383

    Re: Find cells contents elsewhere & 2 Buttons to copy a set of cells.

    It seems to be working...However it seems that I haven't fully made it clear..

    I'd like these to be separate buttons (3 overall)

    1 Button to take me to this weeks timetable.

    1 Button to Copy Week A from sheet 2 to sheet 1 at the bottom

    1 Button to Copy Week B from sheet 2 to sheet 1 at the bottom.

    It seems that you attempted to merge all 3 (Which is beyond what I thought was even possible let alone necessary )

  10. #10
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Find cells contents elsewhere & 2 Buttons to copy a set of cells.

    Button 1:


    Please Login or Register  to view this content.
    Button 2:

    Please Login or Register  to view this content.
    Button 3:

    Please Login or Register  to view this content.

  11. #11
    Valued Forum Contributor
    Join Date
    11-12-2014
    Location
    Nottingham
    MS-Off Ver
    2013
    Posts
    383

    Re: Find cells contents elsewhere & 2 Buttons to copy a set of cells.

    Really starting to get there! Thanks for your continued help!

    Button 1 seems to only return which ever box I have selected however.

    Buttons 2 and 3 only seem to work once...

    Thanks again John!

    EDIT: I now have buttons 2 and 3 working flawlessly by removing the merged cells on sheet 2
    Last edited by ARowbot; 03-17-2015 at 06:15 PM.

  12. #12
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Find cells contents elsewhere & 2 Buttons to copy a set of cells.

    What do you want Button 1 to do. I'm still not getting it?

  13. #13
    Valued Forum Contributor
    Join Date
    11-12-2014
    Location
    Nottingham
    MS-Off Ver
    2013
    Posts
    383

    Re: Find cells contents elsewhere & 2 Buttons to copy a set of cells.

    Basically, It is the same as finding Today's date in column B and scrolling down to it..I just can't get my head around the search function!

  14. #14
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Find cells contents elsewhere & 2 Buttons to copy a set of cells.

    Perhaps:

    Please Login or Register  to view this content.

  15. #15
    Valued Forum Contributor
    Join Date
    11-12-2014
    Location
    Nottingham
    MS-Off Ver
    2013
    Posts
    383

    Re: Find cells contents elsewhere & 2 Buttons to copy a set of cells.

    Unfortunately seems to have no affect...

    Google has been my friend this time...! For those that are interested...

    Please Login or Register  to view this content.
    Last edited by ARowbot; 03-18-2015 at 01:04 PM.

+ 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. Macro - find cells row by row, clear contents if certain value in cells
    By astrbac in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-18-2014, 05:34 AM
  2. Copy contents of one cells and distribute between a maximum of 6 different cells
    By wadapav in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-25-2013, 12:23 PM
  3. Find relevent cells to copy and paste from a preset text in cells
    By dazza67 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-12-2012, 04:39 PM
  4. find and copy partial contents of cells
    By heiniquadrassel in forum Excel General
    Replies: 7
    Last Post: 11-20-2007, 02:57 PM
  5. How do I change a buttons contents depending on a cells contents?
    By Kosh42|EFG in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-16-2005, 10:42 AM

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