+ Reply to Thread
Results 1 to 4 of 4

Please help me get around this:

  1. #1
    Registered User
    Join Date
    06-23-2006
    Posts
    34

    Please help me get around this:

    Selection.End(xlDown).Select
    Selection.Offset(2, 0).Select
    ActiveCell.FormulaR1C1 = "Total Sales"

    Is there a different formula I can use for the 1st line of the above, to get around the problem it creates when there is only one row of data in the block?

    Thanks

    Caroline

  2. #2
    Tim Marsh
    Guest

    Re: Please help me get around this:


    don't know if this is the best way, but it works for me (replace your first
    line with this): -
    '===
    Range("A65536").End(xlUp).Select
    If ActiveCell.Value > "" Then
    ActiveCell.Offset(1, 0).Select
    End If
    '===

    hth,

    tim

    "CarolineHedges"
    <[email protected]> wrote in
    message news:[email protected]...
    >
    > Selection.End(xlDown).Select
    > Selection.Offset(2, 0).Select
    > ActiveCell.FormulaR1C1 = "Total Sales"
    >
    > Is there a different formula I can use for the 1st line of the above,
    > to get around the problem it creates when there is only one row of data
    > in the block?
    >
    > Thanks
    >
    > Caroline
    >
    >
    > --
    > CarolineHedges
    > ------------------------------------------------------------------------
    > CarolineHedges's Profile:
    > http://www.excelforum.com/member.php...o&userid=35705
    > View this thread: http://www.excelforum.com/showthread...hreadid=569941
    >




  3. #3
    Registered User
    Join Date
    06-23-2006
    Posts
    34
    Thank you

    What does this line mean?

    If ActiveCell.Value > "" Then

  4. #4
    Tim Marsh
    Guest

    Re: Please help me get around this:

    it just means if the active cell has an entry, then move to the next row
    (i'm guessing this would normally be the case). if the cell is empty, it
    stays in that cell (this would only apply where there is nothing in there
    are no entries in the column)

    hth,

    tim

    "CarolineHedges"
    <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thank you
    >
    > What does this line mean?
    >
    > If ActiveCell.Value > "" Then
    >
    >
    > --
    > CarolineHedges
    > ------------------------------------------------------------------------
    > CarolineHedges's Profile:
    > http://www.excelforum.com/member.php...o&userid=35705
    > View this thread: http://www.excelforum.com/showthread...hreadid=569941
    >




+ 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