+ Reply to Thread
Results 1 to 3 of 3

Add a value to a cell which is referenced using ".cells"

  1. #1
    Forum Contributor
    Join Date
    12-09-2011
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    201

    Add a value to a cell which is referenced using ".cells"

    I'm trying to increase a particular cell's value by another value, and I am referencing the cell using ".cells", because I am using a variable for the column value:

    Please Login or Register  to view this content.
    But on the first wbk command after the "If volchange > 0" check, I'm getting an "Application Defined or object-defined" error. Any ideas why this might be happening? I tried adding ".Value" to the end of each reference as you can see, but it doesn't work either way.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    re: Add a value to a cell which is referenced using ".cells"

    Hello ianpwilliams,

    The addressing order of the Cells method is the opposite of the Range method. With the method, Range you specify an address as Column then Row. With the Cells method, it Row then Column.

    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Contributor
    Join Date
    12-09-2011
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    201

    re: Add a value to a cell which is referenced using ".cells"

    It's ok, I put the wrong variable in, It's working now. 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