+ Reply to Thread
Results 1 to 9 of 9

Need help coding vba in Excel: copying from one sheet to another

  1. #1
    Registered User
    Join Date
    04-26-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    5

    Exclamation Need help coding vba in Excel: copying from one sheet to another

    Hello everybody,
    I am new at VBA Excel macro coding and I am kind of having problems doing a, so probably, simple coding.
    Since I am an newbie at this, I am apologizing for the obvious mistakes and also thank you in advance for the patience and the help!

    I have an excel where I have two active sheets - Input and output.
    in the first sheet (called Input), I have four columns with a list of keywords. every column has different keywords.
    what I want to do is to copy from the Input (1st sheet), the first column to the Output (sheet nr 2), starting in column 1, row 1 and then, do a 'scanning' till it finds an empty cell and forwards to the next column.
    repeat this for the next 3 columns in the 1st sheet but, adding it always to the Output, 1st column, after the previous copy.

    I want to do this with a while cicle. Probably I will have to do a while inside of a while to go through all the columns and all the rows. (At least this is the way that I see it!)
    I have tried to work with the while cicle in a simple example, but still I haven't succeeded!
    (I thought that if I understood the simple example, I could adapt it to the one I really want to do, but... no luck yet!)

    Can anybody PLEASE help me!
    Thank you in advance
    Last edited by SimpleGirl; 04-26-2013 at 07:08 AM.

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Need help to make a vba macro in excell

    To get your while loops to work:

    Please Login or Register  to view this content.
    You could do it with copy and paste like this:
    Please Login or Register  to view this content.

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

    Re: Need help to make a vba macro in excell

    yudlugar,

    I guess you didnt refresh your page before posting your solution.

    However,

    Your post does not comply with Rule 7 of our Forum RULES. Please do not ignore requests by Administrators, Moderators and senior forum members regarding forum rules.

    If you are unclear about the request or instruction then send a private message to them asking for clarification. Do not post a reply in a thread where a moderator has requested an action that has not yet been complied with e.g Title change or Code tags...etc
    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]

  4. #4
    Registered User
    Join Date
    04-26-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Need help coding vba in Excel: copying from one sheet to another

    Thank youuuuu so much yudlugar for your attention
    I'll try it right away!

  5. #5
    Registered User
    Join Date
    04-26-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Need help to make a vba macro in excell

    It just copies the first column... :/

  6. #6
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Need help coding vba in Excel: copying from one sheet to another

    Oops, try this one instead.

    Apologies Arlu, I'd missed that rule...

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    04-26-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Need help coding vba in Excel: copying from one sheet to another

    Thank you once again for your time and patience!!
    This one only copies the 2nd column :/

  8. #8
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Need help coding vba in Excel: copying from one sheet to another

    I've checked it and it works ok for me - can you upload a sample with an example of how you want the result to look in the output folder?

  9. #9
    Registered User
    Join Date
    04-26-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Need help coding vba in Excel: copying from one sheet to another

    It works now, I was trying it the wrong way!
    Thank you so much for your time
    I really apreciated it!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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