+ Reply to Thread
Results 1 to 11 of 11

VBA to check values from one sheet and copy only content to another sheet

  1. #1
    Registered User
    Join Date
    02-18-2014
    Location
    Faroe Islands
    MS-Off Ver
    Excel 2012
    Posts
    6

    VBA to check values from one sheet and copy only content to another sheet

    VBA to check values from one sheet and copy only content to another sheet

    Hi folks

    I have been trying for the last 5 days x 10 hours to solve my problem. Google searched, VBA tutorials tried, etc.

    Here is the scenario:

    Sheet called "lager" which contains a lot of data and sheet "update" where the content should be copied to.

    In "Lager" sheet - there is a lot of blanks in the column "A" (well - blank in that case that there is a formula in cells, but no content). ie:

    Please Login or Register  to view this content.
    Problem - HOW do I copy all content from "Lager" to "update" - but SKIP every blank in column A - so the result in sheet "update" will be:

    Please Login or Register  to view this content.
    I have 10 columns in "Lager" sheet that needed to be copied to "Update" sheet - but the code shall look in column A, and if any blank - skip the entire row and go to next - if it finds some content - copy it to "update" sheet - and so forth.

    Does it make sense? English is not my native language....

    Kindly regards - and thank you for trying to help me.
    Thomas

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA to check values from one sheet and copy only content to another sheet

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    02-18-2014
    Location
    Faroe Islands
    MS-Off Ver
    Excel 2012
    Posts
    6

    Re: VBA to check values from one sheet and copy only content to another sheet

    Thanx for your effort. But it does not seem to work properly.

    I have two sheets - "Lager" and "update" - and in the "lager" sheet - i have Columns A - J with content in. But if Column A is blank in some cells - skip it and go to the next.

    Can you still help?

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA to check values from one sheet and copy only content to another sheet

    What doesn't work properly? Can you attach a sample file which has data. I tested it on some dummy data I made up.

  5. #5
    Registered User
    Join Date
    02-18-2014
    Location
    Faroe Islands
    MS-Off Ver
    Excel 2012
    Posts
    6

    Re: VBA to check values from one sheet and copy only content to another sheet

    Hi John

    Thank you for helping me. I really appreciate it!

    I have linked to a dummy file here: http://www.hitta.fo/excelforum/dummy1.xlsx

    I hope it give some sense to you. I want to copy all content from the "Lager" sheet, into my "Update" sheet - but no blanks as you can see there is in the Lager sheet.

  6. #6
    Registered User
    Join Date
    02-18-2014
    Location
    Faroe Islands
    MS-Off Ver
    Excel 2012
    Posts
    6

    Re: VBA to check values from one sheet and copy only content to another sheet

    ..sorry.. duplicate post of #5. Have some issues when posting on this forum..
    Last edited by skipperfoto; 02-26-2014 at 04:17 AM. Reason: duplicate post...

  7. #7
    Registered User
    Join Date
    02-18-2014
    Location
    Faroe Islands
    MS-Off Ver
    Excel 2012
    Posts
    6

    Re: VBA to check values from one sheet and copy only content to another sheet

    Hey John - did you gave up? :-)

    Anyone who can point me at the right direction to get this solved?

  8. #8
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA to check values from one sheet and copy only content to another sheet

    Works for me on your sample. Did you select sheets Lager first?

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    02-18-2014
    Location
    Faroe Islands
    MS-Off Ver
    Excel 2012
    Posts
    6

    Re: VBA to check values from one sheet and copy only content to another sheet

    Hi John

    Awesome.. And yes the Lager sheet is selected first. I will check out your code right now... i'll be back ;-)

  10. #10
    Registered User
    Join Date
    02-18-2014
    Location
    Faroe Islands
    MS-Off Ver
    Excel 2012
    Posts
    6

    Re: VBA to check values from one sheet and copy only content to another sheet

    YES! IT works! Thank you a bunch!!

    I will notice your name in my "helpful people" list. :-)

  11. #11
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA to check values from one sheet and copy only content to another sheet

    You're welcome. Glad to help out and thanks for the feedback. Please comply with Forum Rule No. 9.

    9. Acknowledge the responses you receive, good or bad. If your problem is solved, please say so clearly, and mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved". Or click the Edit button on your first post in the thread, Click Go Advanced, select [SOLVED] from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Dropdown option or Edit button will not appear -- ask a moderator to mark it.

  12. #12
    Registered User
    Join Date
    02-18-2014
    Location
    Faroe Islands
    MS-Off Ver
    Excel 2012
    Posts
    6

    Re: VBA to check values from one sheet and copy only content to another sheet

    Thank you again John - I have now made the thread marked "Solved".

    Is it possible to get in touch with you if i have another problem - and i want you to get paid?

  13. #13
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA to check values from one sheet and copy only content to another sheet

    If you have a problem with the solution in this thread, just re-post (you can PM me as well). If you have another problem then start another thread. Never mind about paying. These forums are voluntary. Thanks for the rep.

+ 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. [SOLVED] Clear Content in one sheet and copy & paste value from another sheet
    By tantcu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-16-2013, 11:23 AM
  2. Check if Date is in Range, Copy row values and paste into new sheet
    By learning123 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-12-2012, 03:11 PM
  3. [SOLVED] If cell X's content in Sheet A equals to cell Y's content in Sheet B, Then copy some data.
    By sunheroj in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-09-2012, 09:25 AM
  4. based on Cell/Column content ,cut one sheet's values and paste it in other sheet?
    By mindpeace in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-25-2006, 08:33 AM
  5. based on Cell/Column content ,cut one sheet's values and paste it in other sheet?
    By mindpeace in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-24-2006, 10:33 AM

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