A tricky one

A

ADRIAN

Right, you ready?

I have used:
Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).Select

Is it possible to now continue the pattern that goes down
column A in this blank cell? To give you a better idea the
macro is to create a new part. so when it is run i would
like it to automatically enter the next part number and
move across to column B where the user can enter the
description.

I will be really impressed if anyone can sort this out.
 
F

Frank Kabel

Hi
try something like the following

sub foo()
dim lastrow
with activesheet
lastrow = .Cells(Rows.Count, "A").End(xlUp).row
.cells(lastrow,"A").value = .cells(lastrow-1,"A").value+1
.cells(lastrow,"B").select
end with
end if
 
B

Bob Phillips

Do you mean

With Cells(Rows.Count, "A").End(xlUp)
.Copy
.Offset(1, 0).PasteSpecial Paste:=xlPasteForamts
.Offset(1,1).Select
End With

--

HTH

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

Bob Phillips

Thanks mate.

--

HTH

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

Frank Kabel

Hi Bob
you're welcome :)

</OT>
just wondering: Do you also have a holiday today in England?
 
B

Bob Phillips

No, do you? Our next is end of May.

--

HTH

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

Bob Phillips

What holiday is it?

--

HTH

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

Frank Kabel

Hi
from a religious perspective: Ascension Day

Though it's also 'father's day'. That means most male people (we are
not that strict regarding the 'father' part) are going on 'alcoholic
trips' outside :)
 
Top