• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Range to display in cell

ashfaqbsayed

New Member
from b1 to p74 i want to copy range and paste in email body, so i have a macros for that, the range keeps on changing that is some times it is b1 to p100 some times b1 to p110. b1 is fix and column P is fixed, only row changes.
Is their any way we can do that.
you help is appreciated
And thanks in advance
 

Attachments

  • Monday (Autosaved) - Copy.xls
    467 KB · Views: 1
  • Monday (Autosaved) - Copy.xls
    467 KB · Views: 1
Your question not so much clear... but one thing i understood that, you want to set range dynamically i.e from B1: Px.... So i will prefer to have a look at "How to find last used cell in a range" or something like...

Then you can use that last used cell in your range. Assume that your data is from range B1: P100
To know last used cell in P column, you can use below code
lastRow = range("P65536").end(xlup).row

then you can use it in your range reference, to set it dynamically like

rng = Range("B1: P" & lastRow)
 
Back
Top