Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default 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


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default 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



.

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default 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/

.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
why a reference to an empty cell is not considered empty Nicoscot Excel Discussion (Misc queries) 10 March 10th 06 05:36 AM
in excel..:can't empty clip are" but already empty Alan Gauthier Excel Discussion (Misc queries) 0 February 10th 06 08:02 PM
Excel - Autom. Filter "Empty / Non Empty cells" should come first Rom Excel Discussion (Misc queries) 0 August 10th 05 04:32 PM
How can I convert empty strings to empty cells? Shane Excel Discussion (Misc queries) 2 July 19th 05 12:10 PM
Can blank cells created using empty Double-Quotes not be empty?? JohnI in Brisbane Excel Programming 6 September 7th 03 11:22 PM


All times are GMT +1. The time now is 03:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"