Hi experts

I have been able to amend the code to pick any new sheet name that Ȋ̝̊̅§ 
created. 
 What I kindly request Ȋ̝̊̅§ the format from the first sheet to the new sheet. 
See ♍Ɣ new code below. 

Sub copydata()
 Dim ws1 as worksheet
 Dim ws2 as worksheet 
Dim strtname as string


strName = Sheets(3).Range("A"&rows.count).end(xlup) 
Set ws1 = thisworkbook.sheets("sheet1")
 Set ws2 = thisworkbook.sheets(strtname)
 Ws2.range("a1:ak132").value = Ws1.range("a1:ak132").value End sub




Sent from my BlackBerry® smartphone from Airtel Ghana

-----Original Message-----
From: resp...@gmail.com
Sender: excel-macros@googlegroups.com
Date: Thu, 6 Dec 2012 13:16:02 
To: <excel-macros@googlegroups.com>
Reply-To: excel-macros@googlegroups.com
Subject: $$Excel-Macros$$ Add a new sheet and named based on last item in a row
  *

Thanks again Prince for your help earlier on this. Additional request

The code below enables me to copy data from sheet one to sheet two. The problem 
I have Ȋ̝̊̅§

One. It doesn't copy the format in sheetone to sheet two. Kindly help with the 
code

Two. This other code "addsheets" that creates a name from the last item in a row
strName = Sheets(3).Range("A"&rows.count).end(xlup)
I need help such that in the copydata code ws2 will be equal to the value of  
strName = Sheets(3).Range("A"&rows.count).end(xlup)


Thanks


Sub copydata()
Dim ws1 as worksheet
Dim ws2 as worksheet

Set ws1 = thisworkbook.sheets("sheet1")
Set ws2 = thisworkbook.sheets("sheet2")

Ws2.range("a1:ak132").value =
Ws1.range("a1:ak132").value

End sub




Sub AddSheet()    
Dim strName As String         strName = 
Sheets(3).Range("A"&rows.count).end(xlup)
    Sheets.Add After:=Sheets(Sheets.Count)    ActiveSheet.Name = strNameEnd Su
Sent from my BlackBerry® smartphone from Airtel Ghana

-- 
Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros?hl=en.



-- 
Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros?hl=en.


Reply via email to