+ Reply to Thread
Results 1 to 7 of 7

Putting text in a cell on the same row as an edited cell

  1. #1
    Registered User
    Join Date
    10-09-2012
    Location
    Newark England
    MS-Off Ver
    Excel 2010
    Posts
    8

    Post Putting text in a cell on the same row as an edited cell

    Hi,

    Help!

    I have a macro fired from a Worksheet_Change event that I want to run when a cell in column H is set to a value of >= 0.9. The macro opens an InputBox and I want to put the user entered string (strReply) into column S on the same row.

    I think I have it almost working, just struggling with 2 things:

    1. As you see from the Worksheet_Change sub below I track changes to some columns between C and R and put date and time in column B on change and I still want to do that. But unfortunately all changes to these columns also run my Details macro but I only want the macro to run when column H is changed to >= 0.9 not when other columns are changed or when column H is lower than 0.9.

    2. At the moment, if I change column H on any row the macro runs and puts strReply in cell S4 on my sheet called "Test" and I am strugling to work out how to make it put it in column S on the same row as the changed column H cell. Column H is a percentage probability and is manually updated to a value between 10% and 100% and I only want the Details at probabilites of 90% and above.

    Please Login or Register  to view this content.
    I am not quite a novice but and definitely an amateur.

    Regards,
    Geoff.
    Last edited by Cutter; 10-18-2012 at 11:08 AM. Reason: Added code tags

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Putting text in a cell on the same row as an edited cell

    attach a sample file for testing
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    10-09-2012
    Location
    Newark England
    MS-Off Ver
    Excel 2010
    Posts
    8

    Post Re: Putting text in a cell on the same row as an edited cell

    Hi,

    As requested here is a file to test against. You will see the macro Contract_Details, this is the one I want to use for real but i simplified the text string for the InputBox in macro Details for the forum.

    You will also see the worksheet does other things like the row turns blue when H is set to >= 90% and red when H is set to 0% and there is an InsertRows macro.

    Regards,
    Geoff.
    Attached Files Attached Files

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Putting text in a cell on the same row as an edited cell

    @ London257

    Welcome to the forum.

    Please notice that [CODE] tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at the top of the page and read Rule #3.
    Thanks.

  5. #5
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Putting text in a cell on the same row as an edited cell

    for now make this change and test
    Please Login or Register  to view this content.
    why do you use regexp ?

  6. #6
    Registered User
    Join Date
    10-09-2012
    Location
    Newark England
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Putting text in a cell on the same row as an edited cell

    patel45,

    Thanks that works perfectly and it is much more efficient than my code. I used regexp because it was the first way I managed to get the macro to do what I wanted to do, as I said I am not a novice but definitely an amateur. Thanks once again for your help.

    Regards,
    Geoff.

  7. #7
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Putting text in a cell on the same row as an edited cell

    Thanks for feedback, have you solved ? do you need more help ?

+ 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