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

L

Legacy 98055

Guest
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
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
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
 
Upvote 0

Forum statistics

Threads
1,214,378
Messages
6,119,188
Members
448,873
Latest member
jacksonashleigh99

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top