+ Reply to Thread
Results 1 to 11 of 11

copying infos

  1. #1
    Registered User
    Join Date
    09-14-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    68

    copying infos

    Hello Sir,

    In my opinion, its missing an extra loop that should check for duplication within each invoice. Without this extra loop, it is writing the data for Andrew with both entries as 5,461 the first time and then overwrites then with the 635 value. I tried to place the second loop in there, but couldn't.

    Please see attached excel file which containing Registration sheet and Cashbook sheet. As you see in Cashbook sheet(column X) excel took 5461.23 amount from Registration sheet(which yellow highlighted) and copied to Cashbook sheet(column X row 9). And also copied this amount next below(column X row 10) which it should be copied 635.13 amount.

    Could you please help me to solve this?

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: copying infos

    See if this is what you need.
    Please Login or Register  to view this content.
    David
    (*) Reputation points appreciated.

  3. #3
    Registered User
    Join Date
    09-14-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    68

    Re: copying infos

    Hi Tinbendr,

    Please see above provided code, I see you copied same code. Please check. As per attached file, first row for Andrew should be 5461.23 and second row should be 635.13 in "cashbook" sheet(please be informed that amounts were taken from sheet "Registration" which highlighted yellow for example). But you see macros put 635.13 for first and second row.

    Please help.

    Many Thanks

  4. #4
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: copying infos

    But you see macros put 635.13 for first and second row.
    My code checks for that.

    What is the goal of your code to begin with?

  5. #5
    Registered User
    Join Date
    09-14-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    68

    Re: copying infos

    Macros should check for duplication within each invoice. In cashbook sheet It should be shown both entries as 5,461 the first row and then second row should be the 635 value. Please play macros and you will see macros put 635 value each row.

  6. #6
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: copying infos

    It works on my copy. D/l and try.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    09-14-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    68

    Re: copying infos

    Many Thanks, but please see attached spreadsheet which I added new column same as "Andrew". But still copying only 5461.23 and 635.13. But there are additional names like "Balandzic" as I higlighted. Could you please check.1008200 Copy info.xlsm

  8. #8
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: copying infos

    OK, my code matches Cashbook!N:N to Registration!K:K, and if there is a match, it puts value from Registration!K to Cashbook!X.

    Balandzic won't be copied since the value in Cashbook!N is 35.00 and the values from Registration!K20, 23, 24 do not equal 35.

    If this is not the correct algorithm , please explain in detail. If you were going to do this manually, how would you do it?

  9. #9
    Registered User
    Join Date
    09-14-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    68

    Re: copying infos

    Many Thanks Tinbendr for explanation. It should be matches Cashbook!C:C to Registration!F:F, and Cashbook!S:S to Registration!H:H, and if there is a match, it puts from Regitration!K to Cashbook!X. And it puts from registration!C to Cashbook!V. Balandzic should be copied as there is no need to match values. Just if F+H(in Registration) matches C+S(in Cashbook), then put from Registration!C to Cashbook!V and put Registration!K to Cashbook!X.

    Hope this time everything is clear.

    Your help will be greatly appreciated.

  10. #10
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: copying infos

    If you only match Invoice and Name, and there are multiple matches, then there is no way to correctly add cost to matching line.

    If you then match cost, then the code will fail on Balandzic.

    Please advise.

  11. #11
    Registered User
    Join Date
    09-14-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    68

    Re: copying infos

    There is no need to matching cost. Just please see on below:

    If Registration!F+H matches Cashbook!C+S, then copy appropriate amount with the same line. For exmple, as you see in spreadsheet F7+H7(in registration) = C7+S7(in cashbook), then K7(in registration) copied to X9(in cashbook) same row as appropriate name.

    As you see code was written for below request. But I have one problem that macros matches only last rows of equalization and put cast from Registration sheet to Cashbook sheet. As you see there are 3 rows which highlighted yellow with same name Balandzic. Macros should be took each cost to appropriate rows in cashbook. For example, Registration!F20+H20 = Cashbook!C13+S13, then amount from registration 42 should be copied to Cashbook!X13.

    Hope you understand me and will help.

+ 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. Replies: 1
    Last Post: 10-10-2012, 10:23 AM
  2. Replies: 4
    Last Post: 10-10-2010, 07:32 AM
  3. How to transfer infos from 1 spreadsheet to the other
    By BlueLobster in forum Excel General
    Replies: 5
    Last Post: 06-14-2010, 06:55 PM
  4. Replies: 2
    Last Post: 04-23-2009, 11:08 PM
  5. Simple Copying of specific infos
    By mrosendal in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-06-2008, 05:21 PM

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