+ Reply to Thread
Results 1 to 16 of 16

trying to create button to look at cells if "Alert" is in cell then it copies the row

  1. #1
    Registered User
    Join Date
    05-09-2014
    MS-Off Ver
    Excel 2003
    Posts
    41

    Question trying to create button to look at cells if "Alert" is in cell then it copies the row

    info for that category over to Sheet1

    I am trying to look at a bunch of bonds and have my own alerts that warn me of potential problems.

    The info gets to intensive as there are over 1000 line items (I grabbed just a few to get the concept down)

    I would like to see Sheet1 have bonds which are alerted positioned under that Row 1 (starting at cell E1 to L1) pt over on Sheet1 in an easy way to just see that alerts.

    Does this make sense?

    Thanks for looking
    Mark
    Attached Files Attached Files

  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: trying to create button to look at cells if "Alert" is in cell then it copies the row

    Does this help?

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-09-2014
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: trying to create button to look at cells if "Alert" is in cell then it copies the row

    John - Thanks for helping.

    When I run the code in the first sheet i attached it works great. However, when I run that same code in my main sheet it includes to much data on the Sheet1 tab (I attached it). I can't figure out why it works on one file and not the other??

    Thanks!
    Mark
    Attached Files Attached Files

  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: trying to create button to look at cells if "Alert" is in cell then it copies the row

    Is this any better?

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-09-2014
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: trying to create button to look at cells if "Alert" is in cell then it copies the row

    The first method works better but I am still getting. see attachment to see all the extra info (without alerts) and how it cuts the data off and just stops around line 66 or so

    Thanks
    Mark
    Attached Files Attached Files

  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: trying to create button to look at cells if "Alert" is in cell then it copies the row

    Can you provide both sheets in your sample. (ie sheet to copy from, Sheet with results).

  7. #7
    Registered User
    Join Date
    05-09-2014
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: trying to create button to look at cells if "Alert" is in cell then it copies the row

    I see where the problem is created.

    when I copy/paste the values into a new book (without the formulas), to attach here for you, everything works great in that new sheet. it works perfectly

    the problem is when I apply the code to my main book with all the formulas and I click the button I get too much data. I think the formulas within each cell in columns E-L are causing the problem since Sheet1 is basically a duplicate of Sheet2.

    If there a way to make the code ignore any formulas and just look for "Alert"?? Does this make sense?

    thx

  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: trying to create button to look at cells if "Alert" is in cell then it copies the row

    Give this a try:

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    05-09-2014
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: trying to create button to look at cells if "Alert" is in cell then it copies the row

    I think that got it! I will test it a bit. Thanks!!

  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: trying to create button to look at cells if "Alert" is in cell then it copies the row

    You're welcome. Glad to help out. Hope it works for you.

  11. #11
    Registered User
    Join Date
    05-09-2014
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: trying to create button to look at cells if "Alert" is in cell then it copies the row

    John - last question. How do I get the code to clear the Sheet1 before it runs. I want to see a fresh sheet each time. I also have a title row (Row 1) on Sheet1 so can it clear everything below that first then run?

    thx
    Mark

  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: trying to create button to look at cells if "Alert" is in cell then it copies the row

    Maybe try:

    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    05-09-2014
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: trying to create button to look at cells if "Alert" is in cell then it copies the row

    That works. Thanks

    For future reference, if I want to search for more than one thing (currently just "Alert") do I add 'Or' in the code

    for example, I want to see cells equal to "Alert" and "Fix".

    Do I just do this:

    If Cells(i, y).Value = "Alert" Or "Fix" Then

  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: trying to create button to look at cells if "Alert" is in cell then it copies the row

    Maybe:

    Please Login or Register  to view this content.
    Or

    Please Login or Register  to view this content.

  15. #15
    Registered User
    Join Date
    05-09-2014
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: trying to create button to look at cells if "Alert" is in cell then it copies the row

    very nice! Thanks again

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

    Re: trying to create button to look at cells if "Alert" is in cell then it copies the row

    You're welcome. Glad to help out and thanks for the feedback. Please mark this thread as SOLVED. See link for guidance.

    http://www.excelforum.com/forum-rule...rum-rules.html

+ 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. Replies: 1
    Last Post: 08-15-2014, 06:00 AM
  2. [SOLVED] Code that copies row of data to another sheet based on text "Complete"/"Delete"
    By Dremzy in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 04-20-2014, 05:51 PM
  3. Replies: 2
    Last Post: 04-20-2014, 11:18 AM
  4. Create a Command Button to "Save As" and "Close" an Excel Workbook
    By thedunna in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-26-2013, 05:38 PM
  5. Apply a filter alert to "button"
    By Jogier505 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-21-2009, 03:35 PM

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