Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all, Im using Range("f1").End(xlDown).Offset(1, 0).Select to get to
the next empty cell downwards in a column, It doesnt always work? sometimes it selects the same cell over and over (im using this in various instances). is it something to do with the cell containing a number? also if the collumn is blank then it crashes out, i have to have a line of 1s above the column to make the code work. is there a better way? Duncan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Duncan,
you can use: range("F" & application.rows.count).end(xlup).offset(1,0).sele ct If I understood your question correctly. Regards, Ivan |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Duncan
is there a better way? Try: Dim rng as Range Set rng = Cells(Rows.Count, "A").End(xlUp)(2) Additionally, it is rarely necessary to make selections: it is usually more efficient to manipulate the range object. --- Regards, Norman "Duncan" wrote in message oups.com... Hi all, Im using Range("f1").End(xlDown).Offset(1, 0).Select to get to the next empty cell downwards in a column, It doesnt always work? sometimes it selects the same cell over and over (im using this in various instances). is it something to do with the cell containing a number? also if the collumn is blank then it crashes out, i have to have a line of 1s above the column to make the code work. is there a better way? Duncan |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Brill, thats a lot better than before, also, I have changed it do
rng2.Value instead of selecting it and then doing activecell.value. I think that will be faster. Just another question.....im using rng2.Value = Now() but I could really do with just the time and not the date, is that a command? Duncan |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Duncan
Just another question.....im using rng2.Value = Now() but I could really do with just the time and not the date, is that a command? Try: rng2.Value = Time() --- Regards, Norman |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Many thanks, it appears I am as thick as I thought I was....i have used
time() before......... Many thanks all Duncan |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
To set the time:
Sub asdf() Selection.NumberFormat = "[$-409]h:mm:ss AM/PM;@" Selection.Value = Now() - Int(Now()) End Sub -- Gary's Student "Duncan" wrote: Brill, thats a lot better than before, also, I have changed it do rng2.Value instead of selecting it and then doing activecell.value. I think that will be faster. Just another question.....im using rng2.Value = Now() but I could really do with just the time and not the date, is that a command? Duncan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
End(xlDown) not working? | Excel Discussion (Misc queries) | |||
Unable to get last filled cell address from Range.End(xlDown) method | Excel Programming | |||
repeated end(xldown) | Excel Programming | |||
XlDown: Go to next blank row | Excel Programming | |||
xldown and xlright | Excel Programming |