ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   First empty row after last used row (https://www.excelbanter.com/excel-programming/296002-first-empty-row-after-last-used-row.html)

JUAN

First empty row after last used row
 
Hello,
I want to format the first empty row after the last used
row. IF I use
Range("A65536").End(xlUp).EntireRow.Select
But this won't work. Been locking for similar post but the
ones I tried i can't seem to get it to work.
Can anyone give some info?
I want to put totals on this row.

Thanks,

juan

Don Guillett[_4_]

First empty row after last used row
 
this
Range("A65536").End(xlUp).row+1.EntireRow.Select

or
Cells(Rows.Count, 1).End(xlUp)(2).EntireRow.Select
or
Rows(Cells(Rows.Count, 1).End(xlUp).Row + 1).Select
or

--
Don Guillett
SalesAid Software

"Juan" wrote in message
...
Hello,
I want to format the first empty row after the last used
row. IF I use
Range("A65536").End(xlUp).EntireRow.Select
But this won't work. Been locking for similar post but the
ones I tried i can't seem to get it to work.
Can anyone give some info?
I want to put totals on this row.

Thanks,

juan




Bob Phillips[_6_]

First empty row after last used row
 
Cells(Rows.Count,"A").End(xlUp)..Offset(1,0).Selec t

but you probably don't need the select, you can do most things without
selecting

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Juan" wrote in message
...
Hello,
I want to format the first empty row after the last used
row. IF I use
Range("A65536").End(xlUp).EntireRow.Select
But this won't work. Been locking for similar post but the
ones I tried i can't seem to get it to work.
Can anyone give some info?
I want to put totals on this row.

Thanks,

juan




Gord Dibben

First empty row after last used row
 
Juan

The first empty row is....

RangeRange("A65536").End(xlUp).Offset(1, 0).EntireRow.Select

Gord Dibben Excel MVP


On Thu, 22 Apr 2004 15:09:19 -0700, "Juan" wrote:

Hello,
I want to format the first empty row after the last used
row. IF I use
Range("A65536").End(xlUp).EntireRow.Select
But this won't work. Been locking for similar post but the
ones I tried i can't seem to get it to work.
Can anyone give some info?
I want to put totals on this row.

Thanks,

juan



mudraker[_187_]

First empty row after last used row
 
All the posted examples assume that column a will have an entry in th
last row used


This will give you the last row used without being depending on testin
any particular column


Rows(Cells.Find(what:="*", SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious).Row + 1).Selec

--
Message posted from http://www.ExcelForum.com


JUAN

First empty row after last used row
 
Hello Don/Bob,
thanks tested both or yours and seem fine. Using the
Entirerow, I format the whole row which I don't want. If I
used the one without ENtirerow, I can only figure out how
to format Column A. I want to format Column A-O( In column
A I want to put the word TOTAL and in column C I want to
do a Sum. Do I have to do like an IF/then?

Please advise if this can be done. I'm trying different
ways but can't see to do it.

As always appreciate all the help.

thanks,

juan
-----Original Message-----
this
Range("A65536").End(xlUp).row+1.EntireRow.Select

or
Cells(Rows.Count, 1).End(xlUp)(2).EntireRow.Select
or
Rows(Cells(Rows.Count, 1).End(xlUp).Row + 1).Select
or

--
Don Guillett
SalesAid Software

"Juan" wrote in message
...
Hello,
I want to format the first empty row after the last used
row. IF I use
Range("A65536").End(xlUp).EntireRow.Select
But this won't work. Been locking for similar post but

the
ones I tried i can't seem to get it to work.
Can anyone give some info?
I want to put totals on this row.

Thanks,

juan



.


Don Guillett[_4_]

First empty row after last used row
 
x=Cells(Rows.Count, 1).End(xlUp).Row + 1
range(cells(x,"a"),cells(x,"o")).formathoweveryouw anttoformatit
cells(x,"a")=application.sum(whateveryouwanttosum)

--
Don Guillett
SalesAid Software

"Juan" wrote in message
...
Hello Don/Bob,
thanks tested both or yours and seem fine. Using the
Entirerow, I format the whole row which I don't want. If I
used the one without ENtirerow, I can only figure out how
to format Column A. I want to format Column A-O( In column
A I want to put the word TOTAL and in column C I want to
do a Sum. Do I have to do like an IF/then?

Please advise if this can be done. I'm trying different
ways but can't see to do it.

As always appreciate all the help.

thanks,

juan
-----Original Message-----
this
Range("A65536").End(xlUp).row+1.EntireRow.Select

or
Cells(Rows.Count, 1).End(xlUp)(2).EntireRow.Select
or
Rows(Cells(Rows.Count, 1).End(xlUp).Row + 1).Select
or

--
Don Guillett
SalesAid Software

"Juan" wrote in message
...
Hello,
I want to format the first empty row after the last used
row. IF I use
Range("A65536").End(xlUp).EntireRow.Select
But this won't work. Been locking for similar post but

the
ones I tried i can't seem to get it to work.
Can anyone give some info?
I want to put totals on this row.

Thanks,

juan



.




mudraker[_188_]

First empty row after last used row
 
Sub ss()
Dim r As Long
r = Cells.Find(what:="*", SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious).Row + 1
' format range as required
'Range("a" & r & ":o" & r).Select
'Selection.Font.Bold = True
Range("a" & r & ":o" & r).Font.Bold = True
Cells(r, "a").Value = "Total"
Cells(r, "c").FormulaR1C1 = "=sum(c1:c" & r - 1 & ")"
End Su

--
Message posted from http://www.ExcelForum.com


JUAN

First empty row after last used row
 
Hello Mudraker,
Thanks, FYI, this part of the code
Cells(r, "c").FormulaR1C1 = "=sum(c1:c" & r - 1 & ")"
didn't work property but I figured out and fixed it.
Here's what I came with and works fine:
Cells(r, "c").Value = "=sum(c1:c" & r - 1 & ")"

Thanks for your great help and also all of the rest of you
who provided me with options.

Juan
-----Original Message-----
Sub ss()
Dim r As Long
r = Cells.Find(what:="*", SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious).Row + 1
' format range as required
'Range("a" & r & ":o" & r).Select
'Selection.Font.Bold = True
Range("a" & r & ":o" & r).Font.Bold = True
Cells(r, "a").Value = "Total"
Cells(r, "c").FormulaR1C1 = "=sum(c1:c" & r - 1 & ")"
End Sub


---
Message posted from http://www.ExcelForum.com/

.



All times are GMT +1. The time now is 07:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com