+ Reply to Thread
Results 1 to 2 of 2

Find value in a certain range and then copy to an other sheet

  1. #1
    Registered User
    Join Date
    07-26-2012
    Location
    Cracow, Poland
    MS-Off Ver
    Excel 2003
    Posts
    1

    Question Find value in a certain range and then copy to an other sheet

    Hi Folks,

    I would appreciate some help from you.

    I'm new to VBA and I'm building a macro for work.

    I guess the easier parts are already behind me, now this is the last thing which needs to be solved and I'm quite stuck.

    There is a huge file with vendor open items. I would like the macro to check if a specific value (always in column W, on the sheet "VOI") is existing in column D, on the sheet "Details" while the length of the number in a certain cell, always in column A, on the sheet "VOI" is 10 (because it's for specified vendors whose IDs always consist of 10 digits). If yes, check the next items, if no, copy the value from column W, on the sheet "VOI" to sheet "Details", to column D, to the next empty cell.

    So it's like...

    On the sheet "VOI", while the length of row 2, column 1 = 10, check if row 2, column W is on sheet "Details", in range of column D. If no, please copy the value of row 2, column W from the sheet "VOI" to the sheet "Detail" to the next empty cell in column D.

    And so on with the rows...

    I tried it with recording the macro using the COUNTIF function, but it's time-consuming, so I'm searching for a quicker and more efficient way.

    Thanks in advance!

    Richard

  2. #2
    Forum Contributor
    Join Date
    10-02-2012
    Location
    Bumi Nusantara
    MS-Off Ver
    Excel 2010; Excel 2016
    Posts
    136

    Re: Find value in a certain range and then copy to an other sheet

    try this code

    Please Login or Register  to view this content.

+ 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