+ Reply to Thread
Results 1 to 8 of 8

code to change row values a little help needed

  1. #1
    Registered User
    Join Date
    08-15-2011
    Location
    Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    38

    code to change row values a little help needed

    how can i change it for this row like b:d in the same row as the targets row


    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    09-30-2009
    Location
    Barcelona
    MS-Off Ver
    Excel 2010
    Posts
    274

    Re: code to change row values a little help needed

    Quote Originally Posted by hattisaeed View Post
    how can i change it for this row like b:d in the same row as the targets row


    Please Login or Register  to view this content.
    I don't really understand what you are trying to accomplish here. Could you explain more in detail?

  3. #3
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: code to change row values a little help needed

    Is this what you're after?

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    08-15-2011
    Location
    Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    38

    Re: code to change row values a little help needed

    works like a gem another help please then its done.....if say target value is right now 5 , i want that every time it increases by 1 or greater the row changes otherwise not for example

    like if its 5 and i change it 5.9 it shouldnt change but at 6 it should

    if target.value>target.value(previous) +1 then

  5. #5
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: code to change row values a little help needed

    So far as I'm aware once you've triggered the worksheet change event the cell value is changed and the previous value is lost.

    The way to get around this would be to use another column to hold the previous value. In the example below I've used column E, but you might want to use something more out of the way.

    Please Login or Register  to view this content.

  6. #6
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: code to change row values a little help needed

    Hi,

    Since 17-08-2011 you started 14 threads. Only one of these you marked as 'solved'. Are the other threads still puzzling you ?



  7. #7
    Registered User
    Join Date
    08-15-2011
    Location
    Pakistan
    MS-Off Ver
    Excel 2007
    Posts
    38

    Re: code to change row values a little help needed

    i have one more query which i might solve the problem i m sorry i m getting annoying
    is there a way i can check that the next updated value is a whole number not a decimal
    like if target.value is a whole number
    then do something

    else it stays the same do nothing

  8. #8
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: code to change row values a little help needed

    Yes, you can check if the target value is a whole number with:

    Please Login or Register  to view this content.

    If this one is now done then best heed snb's advice and mark the thread as solved, thanks.

+ 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