+ Reply to Thread
Results 1 to 13 of 13

I can't use Offset and change value at the same time

  1. #1
    Registered User
    Join Date
    07-20-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    5

    I can't use Offset and change value at the same time

    Hi everyone! I don't know a lot about Excel and I haven't done anything with it in the last year, so I forgot most of what I knew. I have recently started to work with it again and I'm struggling a lot.
    The macro I'm writting has an error in this line:
    Please Login or Register  to view this content.
    I have also tryed it like this:
    Please Login or Register  to view this content.
    Can someone tell me please whats wrong?

    Thanks everyone
    Last edited by mps111; 07-20-2012 at 11:08 AM. Reason: Incorrect title

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,822

    Re: Error

    Have a read through the Forum Rules at the top of the page, and then amend your title to something more meaningful before the mods force you to do so.

    Maybe you can also explain what E1 is - a variable?

    Pete

  3. #3
    Registered User
    Join Date
    07-20-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: I can't use Offset and change value at the same time

    E1 is a cell. Can't I use it this way? I don't remember how all this works - have been working online instead, in some websites...

  4. #4
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: I can't use Offset and change value at the same time

    If you want to set the value of the offset cell to that of E1 then this
    Please Login or Register  to view this content.

  5. #5
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,318

    Re: I can't use Offset and change value at the same time

    You can try...

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    or
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    HTH
    Regards, Jeff

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,822

    Re: I can't use Offset and change value at the same time

    Try it like this:

    Please Login or Register  to view this content.
    Hope this helps.

    Pete

  7. #7
    Registered User
    Join Date
    07-20-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: I can't use Offset and change value at the same time

    It doesn't work like this:
    Please Login or Register  to view this content.
    or like this:
    Please Login or Register  to view this content.
    But I think the problem isn't there because if i replace the cell for "1", it still doesn't work...
    Last edited by mps111; 07-20-2012 at 11:24 AM.

  8. #8
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: I can't use Offset and change value at the same time

    What do you mean "doesn't work"? Error message? Which is the active cell?

  9. #9
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,822

    Re: I can't use Offset and change value at the same time

    Don't know what "doesn't work" means. Wrong result, error of some kind, computer blows up ??

    Which is the ActiveCell when you get to that line? If it is in column A or B then you can't move 2 columns to the left to write the value of E3 there.

    Pete

  10. #10
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: I can't use Offset and change value at the same time

    Pete_UK: snap.

  11. #11
    Registered User
    Join Date
    07-20-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: I can't use Offset and change value at the same time

    Yes, error message.

    This is the full code:
    Please Login or Register  to view this content.
    So yes, it selects a cell before that line
    Last edited by mps111; 07-20-2012 at 11:35 AM.

  12. #12
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: I can't use Offset and change value at the same time

    Perhaps explain what you're trying to achieve - there might be an easier way?

  13. #13
    Registered User
    Join Date
    07-20-2012
    Location
    Porto, Portugal
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: I can't use Offset and change value at the same time

    I need to check, for every row, if C1 is bigger than collumn C and if it is, than A is 1. If it isn't, A is 0. This is the way I'm trying to do it, if there is an easier one, great.

+ 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