Consulting

Results 1 to 4 of 4

Thread: Static cell

  1. #1

    Static cell

    Hi,

    I am trying to record pasting the copied data in the first empty cell but the macro is coding the cell number,
    how can i make this dynamic.

    Thanks

  2. #2
    VBAX Mentor 大灰狼1976's Avatar
    Joined
    Dec 2018
    Location
    SuZhou China
    Posts
    479
    Location
    Hi TradeTech!
    cells(rows.count,"A").end(3).offset(1)
    Represents the first empty cell in column A

  3. #3
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by 大灰狼1976 View Post
    Hi TradeTech!
    cells(rows.count,"A").end(3).offset(1)
    Represents the first empty cell in column A
    Not necessarily, it is the blank cell beyond the last populated cell in column A, there could be blank cells in column A between A1 and the last populated cell.

    And why would you use End(3) rather than End(xlUp), don't you like making the code clearer?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  4. #4
    VBAX Mentor 大灰狼1976's Avatar
    Joined
    Dec 2018
    Location
    SuZhou China
    Posts
    479
    Location
    Quote Originally Posted by Bob Phillips View Post
    Not necessarily, it is the blank cell beyond the last populated cell in column A, there could be blank cells in column A between A1 and the last populated cell.

    And why would you use End(3) rather than End(xlUp), don't you like making the code clearer?
    Hello Bob! Thanks for your suggestions. The supplementary explanation is very correct.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •