+ Reply to Thread
Results 1 to 9 of 9

Insert values from one sheet to another with a Loop

  1. #1
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Insert values from one sheet to another with a Loop

    Dear Friends,

    I need to insert values from a column in one sheet to another sheet with a Loop mentioned here.

    (I have attached a sample workbook for your kind reference.)

    IN STATEMENT SHEET, I NEED TO INSERT (IN col F) THE VALUES from Col A of NOS sheet.THE INSERTION SHOULD BE LOOPED AS MENTIONED HERE

    i.e. First time, it should be 1 to 10
    Second time it should be 2 to 10 and 1
    Third time it should be 3 to 10 and 1, 2
    Fourth time it should be 4 to 10 and 1,2,3
    Fifth time it should be 5 to 10 and 1,2,3,4 …. And so on, till the last row with a value in ColA.
    THE VALUES IN Col A of NOS Sheet MAY BE CHANGED WHENEVER REQUIRED. There it is 1 to 10, but it may be Alphabets or any other words also.
    Hence, whatever values in Col A of NOS sheet should be taken for looping.
    I hope some one will help me to find the solution through VBA.

    Thanks in advance.

    acsishere.
    Attached Files Attached Files
    Last edited by VBA Noob; 10-11-2008 at 09:22 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    I haven't a clue what you mean!
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394
    and why have you chosen to call your sheet Q14.xls?

  4. #4
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764

    macro

    Hi
    Try the macro in the attached file
    Ravi
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Smile Dear Mr. Ravishankar,

    Yes Sir, you got it. In fact it is almost 99% done.

    When I run the code I am facing only one problem. i.e. in NOS sheet the number of rows should be 10 as per the macro. But, I need that if I enter 1,2,3,4 and 5 it should be looped as mentioned.

    I have clearly mentioned the problem(s) in the sample workbook attached with this post.

    Please Sir,

    Thanking you for your help.

    acsishere.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764

    modified macro

    Hi
    The attachment has modified macro. Not sure where you want complete set of 5 nos and where blanks start appearing.
    Ravi
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Smile Dear Sir,

    Dear Sir,

    Thanks for your continuous support. Still, I need your further support to get the program as it is required.

    Sir, I have once again mentioned the modifications in BOTH NOS sheet & STATEMENT sheet. (Attached the sample file).

    Please Sir, help me to find the soultion.

    Thanks in advance.

    acsishere.
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764

    modified macro

    Hi
    try this modification
    Ravi
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Thumbs up Dear Sir,

    Thanks a lot for your solution & continuous support.

    This is the ultimate solution.

    Again, thanks, thanks a lot.

    acsishere.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. auto insert column when sheet is opened
    By SMUGGLINGSTONES in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-11-2008, 02:21 PM
  2. VBA; find string and copy
    By Bill Rudd in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 03-06-2008, 10:41 PM
  3. copying cell values to specific area in sheet
    By Reinder in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-12-2007, 09:55 AM
  4. Replies: 6
    Last Post: 02-12-2007, 05:16 PM
  5. Match 2 values from one sheet in another sheet.
    By Liquorice in forum Excel General
    Replies: 24
    Last Post: 11-27-2006, 06:15 AM

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