+ Reply to Thread
Results 1 to 8 of 8

Need to insert Rows Based on a Condition

  1. #1
    Registered User
    Join Date
    02-26-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    13

    Need to insert Rows Based on a Condition

    Dear Experts,

    I have a file where I need to insert rows based on employees working in the site. I am doing it now manually but its a tedious task as I have to do it for more than 7000 people.

    Below is what I want to do (Note: each site is differentiated by the merged cell)

    Till 3 people working insert 1 row
    Till 5 People working insert 2 rows
    Till 10 People working insert 4 rows
    Till 20 people working insert 8 rows
    More than 20 people working insert 10 rows

    Thank you in anticipation !

    Attached : sample sheet for reference
    Attached Files Attached Files

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Need to insert Rows Based on a Condition

    Will your original file have the merged rows or have you done it to explain to us?

    Also, will the numbers
    Till 3 people working insert 1 row
    Till 5 People working insert 2 rows
    Till 10 People working insert 4 rows
    Till 20 people working insert 8 rows
    More than 20 people working insert 10 rows
    remain fixed always?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    02-26-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Need to insert Rows Based on a Condition

    The attached file is a attendance sheet of employees. These people work in different locations under different supervisors.

    The original file I download will not have the merged cells. I do it to differentiate it between sites. Yes the number of rows that I am going to insert will be fixed.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Need to insert Rows Based on a Condition

    Your new file didnt come through.

  5. #5
    Registered User
    Join Date
    02-26-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Need to insert Rows Based on a Condition

    Sorry I meant the file I attached with my first post. Do you want me to update the file once again. I have attached the sample file of output which I am trying to get. Manually inserted rows I have highlighted in blue.
    Attached Files Attached Files
    Last edited by skandkamat; 04-14-2013 at 07:48 AM.

  6. #6
    Registered User
    Join Date
    02-26-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Need to insert Rows Based on a Condition

    Some one please help. Is it possible to do? Its little urgent and i am going through hell bcoz of this one that that i have to do again and again

  7. #7
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Need to insert Rows Based on a Condition

    Your attachment in post 5 does not have any blue lines.

  8. #8
    Registered User
    Join Date
    02-26-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Need to insert Rows Based on a Condition

    Sorry, May be I have attached the wrong file. PFA the correct file.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1