Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: No Help on this one? Thanks Jay! Exactly what I needed...

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi everyone!
    I've recieved wonderful help here and I doubt this one will be too tough at all.

    I have learned how to find the next available row with formulas I have gotten from this room such as .End(xlUp).Row).Rows.Count.

    How do I apply this to find the next available column?
    I searched and could find no reference to an xlAcross?

    The criteria would be the Cell located in row 5 = Nothing to decide if that column is the next column available.

    For Example:
    If each cell in Range("A5:E5") contained data, but no data in F5, which formula would give me the column number or address of COlumn 'F'?

    Thanks again!
    Tom


    [ This Message was edited by: TsTom on 2002-04-09 21:41 ]

    [ This Message was edited by: TsTom on 2002-04-09 22:37 ]

  2. #2
    MrExcel MVP Jay Petrulis's Avatar
    Join Date
    Mar 2002
    Location
    Chicago, IL USA
    Posts
    2,040
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Tom,

    Here are two ways:

    lastcolumn = Cells(2, Columns.Count).End(xlToLeft).Column

    With ActiveSheet
    .UsedRange
    lastcolumn = .Cells(xlCellTypeLastCell).Column
    End With

    Bye,
    Jay

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks Jay!
    That is exactly what I was looking for...
    Tom

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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