see if it helps

Sub sample()
Dim i As Long, j As Long, s As Integer

For i = Sheets("038G-C034-E-CABLE").Range("A65356").End(xlUp).Row - 1 To 3
Step -1
    For j = 8 To
Sheets("038G-C034-E-CABLE").Range("h2").End(xlToRight).Column
        If Sheets("038G-C034-E-CABLE").Cells(i, j).Value > 0 Then
            s = Sheets("038G-C034-E-CABLE").Cells(1, j).Value
            Sheets("038G-C034-E-CABLE").Range("A" & i + 1).Resize(s,
1).EntireRow.Insert
            Exit For
        End If
    Next
Next
End Sub




On Sat, Jul 7, 2012 at 8:58 PM, dguillett1 <dguille...@gmail.com> wrote:

>   Tested just fine
> See att
>
> Don Guillett
> Microsoft Excel Developer
> SalesAid Software
> dguille...@gmail.com
>
>  *From:* vijay yadav <vijay.ganesh.ya...@gmail.com>
> *Sent:* Saturday, July 07, 2012 10:13 AM
> *To:* excel-macros@googlegroups.com
> *Subject:* $$Excel-Macros$$ Re: to insert rows ,rows inserted should be
> equal to integer in corresponding cell in the top row
>
>  Hi Don Guillett
>
> The macro is giving syntax error
> Please help.
>
> Regards
> Vijay yadav
>
>
> On Friday, 6 July 2012 12:29:14 UTC+5:30, vijay yadav wrote:
>>
>> Hi Experts,
>>
>> I need a macro which coluld do the following
>>
>> 1)top row contains integer  1 to 50 from B column to BZ column
>>
>> 2)other rows contain entries in column A
>>
>>
>> 3)Also rows contains one entry beneath the integers in top row
>>
>> the macro should read the columm corresponding to entries in column A and
>>
>> should insert no of rows below entries
>>
>> the no of rows inserted should be equal to the integer in top row
>>
>> Please see excel sheet attached for reference
>>
>> Please help
>>
>> Regards
>> Vijay
>>
> --
> 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
>
> --
> 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
>



-- 
*Regards*
* *
*Ashish Koul*


*Visit*
*http://www.excelvbamacros.com/*
*http://www.accessvbamacros.com/*

P Before printing, think about the environment.

-- 
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