![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
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 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
|
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 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Thanks Jay!
That is exactly what I was looking for... Tom |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|