Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default A tricky one

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default A tricky one

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



--
Regards
Frank Kabel
Frankfurt, Germany


ADRIAN wrote:
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.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default A tricky one

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)

"ADRIAN" wrote in message
...
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.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default A tricky one

Hi Bob
small typo :-)
.Offset(1, 0).PasteSpecial Paste:=xlPasteFormats

--
Regards
Frank Kabel
Frankfurt, Germany


Bob Phillips wrote:
Do you mean

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


"ADRIAN" wrote in message
...
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.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default A tricky one

Thanks mate.

--

HTH

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

"Frank Kabel" wrote in message
...
Hi Bob
small typo :-)
.Offset(1, 0).PasteSpecial Paste:=xlPasteFormats

--
Regards
Frank Kabel
Frankfurt, Germany


Bob Phillips wrote:
Do you mean

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


"ADRIAN" wrote in message
...
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.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default A tricky one

Hi Bob
you're welcome :-)

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


--
Regards
Frank Kabel
Frankfurt, Germany


Bob Phillips wrote:
Thanks mate.


"Frank Kabel" wrote in message
...
Hi Bob
small typo :-)
.Offset(1, 0).PasteSpecial Paste:=xlPasteFormats

--
Regards
Frank Kabel
Frankfurt, Germany


Bob Phillips wrote:
Do you mean

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


"ADRIAN" wrote in message
...
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.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default A tricky one

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)

"Frank Kabel" wrote in message
...
Hi Bob
you're welcome :-)

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


--
Regards
Frank Kabel
Frankfurt, Germany


Bob Phillips wrote:
Thanks mate.


"Frank Kabel" wrote in message
...
Hi Bob
small typo :-)
.Offset(1, 0).PasteSpecial Paste:=xlPasteFormats

--
Regards
Frank Kabel
Frankfurt, Germany


Bob Phillips wrote:
Do you mean

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


"ADRIAN" wrote in message
...
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.



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
This One Is Tricky Need Help !!!!! Mike Excel Discussion (Misc queries) 2 January 10th 10 04:50 PM
This might be a little tricky...... nevi Excel Discussion (Misc queries) 2 June 17th 06 04:22 AM
Is it just me or is this tricky? philawde Excel Discussion (Misc queries) 7 November 23rd 05 03:58 PM
Tricky maybe Frazcmankfar Excel Worksheet Functions 0 August 18th 05 05:25 PM
Mmm tricky- but i'm sure someone out there can help! ali Excel Programming 1 December 6th 03 08:06 PM


All times are GMT +1. The time now is 10:11 AM.

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

About Us

"It's about Microsoft Excel"