+ Reply to Thread
Results 1 to 5 of 5

Adding extra to code, add row Excel 2003

  1. #1
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Adding extra to code, add row Excel 2003

    I have the following VB Code:

    Please Login or Register  to view this content.

    I need to also the code to look in the information from column 1 and add the exact same text to the added rows but below column 1

    Ex:

    A5 = Text
    B5 = 004

    Code will add three extra rows with the following information

    C5 = Text/001/HS
    C6 = Text/002/HS
    C7 = Text/003/HS
    C8 = Text/004/HS

    I need it to add the text from A5 to A6, A7, A8.

    A5 = Text; B5 = 004; C5 = Text/001/HS
    A5 = Text;
    A7 = Text;
    A8 = Text.

  2. #2
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: Adding extra to code, add row Excel 2003

    Fist Code
    .....A......B........C
    5..Test...004...Test/001/HS
    6...................Test/002/HS
    7...................Test/003/HS
    8...................Test/004/HS

    I need it to add A6, A7 and A8 also


    .....A......B........C
    5..Test...004...Test/001/HS
    6..Test...........Test/002/HS
    7..Test...........Test/003/HS
    8..Test...........Test/004/HS

  3. #3
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: Adding extra to code, add row Excel 2003

    Better explanation:

    I have info in column 1 every time I add a number in column B, it will add extra rows but taking in consideration that the first row is also information. Therefore “004” equal three “extra” rows.

    The code will add what text is in Column A and add it to Column C in accordance with Column B.

    If A5 has the following… Test001, and the user adds 004 to B5 then

    C5 will be Test001/001/HS;
    C6 will be Test001/002/HS;
    C7 will be Test001/003/HS and
    C8 will be Test001/004/HS.

    I need to have the code modified to add the info that is in the first row, in this example the text is “Test001” (Note that any text can be in Column A) to add itself to the extra rows in column A. Therefore in this case below A5.

    A6, A7 and A8 will lookup A5 and add Test001.

    The code is already doing what I want it to do. I need to add the folowing

  4. #4
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: Adding extra to code, add row Excel 2003

    Please Help it is one of the important code to finalize my workbook.

  5. #5
    Forum Contributor
    Join Date
    03-29-2012
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    818

    Re: Adding extra to code, add row Excel 2003

    The function is: If a number is added to Column B then “x” amount of rows is inserted with the information from Column A plus “/” and “000/HS” in Column C.

    I need to add the following:

    If a number is added in Column B then add “x” amount of rows with the information from Column A plus “/” and “000/HS” in Column C Then Search Column A from that same row to add the information from Column A to the extra rows but downwards from Column A.

    Example if you take row 7

    If Column A Row 7 text is “Report” Then the user adds “004” to Column B Row 7, the code will add three rows in column C adding the following information.

    C7 = Report/001/HS; C8 = Report/002/HS; C9 = Report/003/HS; C10 = Report/004/HS.

    This is the existent code.

    I need the code to also Add the “Report” from Column A Row 7 to Column A Row 8,9 and 10.

    Please help

+ 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