Hi Subu

Deal with item 2 first.  On your master sheet put the following
formula into cell B11.  This will show the current sheetname even if
it is changed.

=MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255)

Now,  To copy the content of the blank sheets use the following (i
assume that the non-blank sheets will all have something in cell B11 -
if they do not make sure something is there!).


Sub copysheets()
Dim sh As Worksheet

For Each sh In Worksheets
If sh.Cells(11, "B") = "" Then
Worksheets("Sheet5").Cells.Copy _
    Destination:=sh.Cells
End If
Next sh
End Sub

Best regards
David Grugeon

On 27/05/2012, .. <mail_to_s...@yahoo.com> wrote:
>
>
> Dear Rajan
>
>
>
> Thanks for the reply....and...sorry for the delayed comment from me
>
> ok. I agree that you know intloop MUCH better than I do
>
> However your program is NOT working on my sp sheet
>
> The VBA starts copying OVER sheets with existing data and that is a problem
>
> for me
>
>
>
>
> regards
>
> Subu
>
>
>
>
>
>
>
> On Thursday, May 17, 2012 5:05:36 PM UTC+4, Rajan_Verma wrote:
>>
>> Hi Sabu,
>>
>> Intloop can not be 1 if your workbook have at least one worksheet with
>> data , IntLoop is actually starting From first Blank Worksheets Index,
>>
>> Suppose if you have 5 filled workhseets then 10 blank worksheets, IntLoop
>>
>> will be start from 6 and end with 10
>>
>>
>>
>> * *
>>
>> *Regards*
>>
>> *Rajan verma*
>>
>> *+91 7838100659 [IM-Gtalk]*
>>
>>
>>
>> *From:* excel-macros@googlegroups.com [mailto:
>> excel-macros@googlegroups.com] *On Behalf Of *..
>> *Sent:* 17 May 2012 1:54
>> *To:* excel-macros@googlegroups.com
>> *Subject:* Re: $$Excel-Macros$$ 1. paste standard content to all sheets
>> 2. paste sheet name to a specific cell
>>
>>
>>
>> From : Subu
>> ----------------------------------------
>>
>>
>> Dear Rajan other list members
>>
>> I'm a complete novice in VBA. Still, I think there is a problem in this
>> reply / code below
>>
>>    - When you reach this statement "...    Worksheets(intLoop).Paste...",
>>
>>    Intloop is still = 1. i.e. value of Intloop is still 1. So
>>    Worksheets(intLoop) is the first sheet
>>    - So the program starts pasting from the first sheet ...which happens
>>    to be a old sheet with data
>>    - So Intloop has to be changed / reset to the first blank sheet
>>    - How does one do that
>>
>> best regards
>>
>> Subu
>>
>>
>>
>>
>> On Wednesday, May 16, 2012 5:34:25 PM UTC+4, Rajan_Verma wrote:
>>
>> Try this ::
>>
>>
>>
>>
>>
>> Sub CopyPaste()
>>
>>
>>
>>     Dim wkssheet As Worksheet
>>
>>     Dim IntIndex  As Integer
>>
>>     Dim intLoop   As Integer
>>
>>     Dim StrSrcName As String
>>
>>     For Each wkssheet In ThisWorkbook.Worksheets
>>
>>         If wkssheet.UsedRange.Cells.Count > 1 Then
>>
>>             IntIndex = wkssheet.Index
>>
>>             Exit For
>>
>>         End If
>>
>>     Next wkssheet
>>
>>
>>
>>     StrSrcName = InputBox("Please enter the Source Sheet Name") ' I will
>> suggest to COpy paste the sheet Name
>>
>>     Worksheets(StrSrcName).UsedRange.Copy
>>
>>     For intLoop = IntIndex To Worksheets.Count
>>
>>         Worksheets(intLoop).Paste
>>
>>         Worksheets(intLoop).Range("B11") = Worksheets(intLoop).Name
>>
>>     Next
>>
>>     Application.CutCopyMode = xlCopy
>>
>> End Sub
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> * *
>>
>> *Regards*
>>
>> *Rajan verma*
>>
>> *+91 7838100659 [IM-Gtalk]*
>>
>>
>>
>> *From:* excel-macros@googlegroups.com [mailto:
>> excel-macros@googlegroups.com] *On Behalf Of *..
>> *Sent:* 16 May 2012 6:22
>> *To:* excel-macros@googlegroups.com
>> *Subject:* $$Excel-Macros$$ 1. paste standard content to all sheets 2.
>> paste sheet name to a specific cell
>>
>>
>>
>> Dear Members
>>
>> I use XL 2003, Win XP. I have the following *request*
>>
>> 1. I have a workbook with approx 170 sheets
>> 2. The first 90 or so sheets have some content in them (call them the old
>>
>> sheets), the remaining 80 or so are blank as of now (call them new
>> sheets)
>> 3. I wish to take the content from one of the old sheets ...say sheet # 70
>>
>> and paste it to all the blank / new sheets [same source , paste on all
>> *blank* sheets, paste only on blank sgeets]
>> 4. Is there an easy way , with or without VB
>>
>> 5. Once (4) above is accomplished,
>> 6. I need to past the sheet name of the *new* sheets - only new sheets on
>>
>> to cell B 11 of each of the new sheet. i.e. IF the name on sheet #100 is
>> Delhi, I wish to copy the Text "Delhi" (without the quotes)  to Cell B 11
>>
>> of sheet # 100
>>
>> any help towards the above would be gratefully acknowledged
>>
>>
>> thanks in adv. and regards
>>
>> Subu
>>
>> --
>> FORUM RULES (986+ members already BANNED for violation)
>>
>> 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) Cross-promotion of, or links to, forums competitive to this forum in
>> signatures are prohibited.
>>
>> NOTE : Don't ever post personal or confidential data in a workbook. Forum
>>
>> owners and members are not responsible for any loss.
>>
>>
>> ------------------------------------------------------------------------------------------------------
>> To post to this group, send email to excel-macros@googlegroups.com
>>
>> --
>> FORUM RULES (986+ members already BANNED for violation)
>>
>> 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) Cross-promotion of, or links to, forums competitive to this forum in
>> signatures are prohibited.
>>
>> NOTE : Don't ever post personal or confidential data in a workbook. Forum
>>
>> owners and members are not responsible for any loss.
>>
>>
>> ------------------------------------------------------------------------------------------------------
>> To post to this group, send email to excel-macros@googlegroups.com
>>
>
> --
> FORUM RULES (986+ members already BANNED for violation)
>
> 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)  Cross-promotion of, or links to, forums competitive to this forum in
> signatures are prohibited.
>
> NOTE  : Don't ever post personal or confidential data in a workbook. Forum
> owners and members are not responsible for any loss.
>
> ------------------------------------------------------------------------------------------------------
> To post to this group, send email to excel-macros@googlegroups.com
>
> To unsubscribe, send a blank email to
> excel-macros+unsubscr...@googlegroups.com


-- 
David Grugeon

-- 
FORUM RULES (986+ members already BANNED for violation)

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)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com

To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com

Reply via email to