+ Reply to Thread
Results 1 to 4 of 4

Macro to insert a row / rows with formula from above row based on number of reports

  1. #1
    Registered User
    Join Date
    01-08-2012
    Location
    Ankara, Turkey
    MS-Off Ver
    Excel 2010
    Posts
    3

    Macro to insert a row / rows with formula from above row based on number of reports

    Hi Guys,

    I have a workbook (named A), getting some data by formula from other workbook (named B). According to number of reports, taken from workbook “B” to workbook “A”, I need to insert a row / rows and copy formula for the new row from above row in workbook “A”. (When I enter the name of a part in workbook “A” in column C in any row, number of reports for this part in column E appears automatically like 1, 2 ,3 or 4 etc.. I get all data according to part names from workbook “B” with excel formulation). If there is no value or written “1” for the number of report of the specified part name, I don’t need any row (there will be only existing row), but if it is written more than 1, let’s say “2”, I need to insert one new row just below the existing row with copied formulas from above row. if it is written “3”, I need to insert 2 new rows again with formulas. I have more than 1000 part names, and number of reports for each one are variable.

    Thanks in advance for any help.

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

    Re: Macro to insert a row / rows with formula from above row based on number of repor

    Welcome to the Forum.

    Kindly attach a sample workbook with some dummy data so we can assist you quickly.
    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
    01-08-2012
    Location
    Ankara, Turkey
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Macro to insert a row / rows with formula from above row based on number of repor

    Quote Originally Posted by arlu1201 View Post
    Welcome to the Forum.

    Kindly attach a sample workbook with some dummy data so we can assist you quickly.
    Hi,

    I tried to explain what i need in two workbooks. I showed the current situation (without macro) and the situation with macro (if i had) in workbook "A". According to report quantity (F column in workbook "A"), i need to insert a row / rows below the existing row by copying the formula with macro. There are two columns in workbook "A"; one is to find the report number's column in workbook "B", the other one is to find the report number's row in workbook "B". And thanks to index numbers (A column in workbook "A"), i will be able to transpose the report numbers for each rows (from workbook "B" to workbook "A"). But, is there any way to arrange this index number column with macro too according to report quantity at the same time with inserting the row?

    Inserting row will be important for me to give some hyperlink according to report number for each row, after than all those reports will be sent to different folders by using another macro at a time.

    (I hope inserting row works for the pending report numbers. For example there is no report for "Part 4" right now in workbook "A". Later, if there are "3" reports for this part, "Part 5" will be affected from inserted rows or not? Because there are some cells with formula and no formula in a row for "Part 5").

    Thanks for your help.

    Regards,
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    01-08-2012
    Location
    Ankara, Turkey
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Macro to insert a row / rows with formula from above row based on number of repor

    Quote Originally Posted by Anil Kutlu View Post
    Hi,

    I tried to explain what i need in two workbooks. I showed the current situation (without macro) and the situation with macro (if i had) in workbook "A". According to report quantity (F column in workbook "A"), i need to insert a row / rows below the existing row by copying the formula with macro. There are two columns in workbook "A"; one is to find the report number's column in workbook "B", the other one is to find the report number's row in workbook "B". And thanks to index numbers (A column in workbook "A"), i will be able to transpose the report numbers for each rows (from workbook "B" to workbook "A"). But, is there any way to arrange this index number column with macro too according to report quantity at the same time with inserting the row?

    Inserting row will be important for me to give some hyperlink according to report number for each row, after than all those reports will be sent to different folders by using another macro at a time.

    (I hope inserting row works for the pending report numbers. For example there is no report for "Part 4" right now in workbook "A". Later, if there are "3" reports for this part, "Part 5" will be affected from inserted rows or not? Because there are some cells with formula and no formula in a row for "Part 5").

    Thanks for your help.
    Regards,


    Hi,

    Any help or response please.

    Regards,

+ 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