+ Reply to Thread
Results 1 to 19 of 19

VBA macro that can examine if translation of certain words is done right.

  1. #1
    Registered User
    Join Date
    10-12-2013
    Location
    SH
    MS-Off Ver
    Excel 2013
    Posts
    22

    VBA macro that can examine if translation of certain words is done right.

    Hi.

    I've been getting a lot of help just by looking up this forum. This is my second post and I need some help again. : )

    I was trying to make VBA macro that can examine if translation of certain words is done right.
    I am wondering if anyone can help me with conditions below:

    - There are two excel files.
    File A is Translation file that has original text in even row of column N(ex,N2,N4,N6...) and translation text in odd row of column N(ex, N3,N5,N7,...).
    And file B is VBA macro file that has a list of words in column A (which is english original text) and B(which is other language word).
    - Macro search if each original text of file A (which is even row of column N in file A) has the column A words of file B and if there is, it checks if there are the words in the same rows of column B of file B in the translation text (which is odd row of column N in file A)
    And if original text has some words of column A and translation text doesn't have matching words of column B, then not the relevant words of column A appear in column U of file A.

    For example, if cell N2 of file A is like below,

    Centrally located, Grand Villa provides the ideal starting point for your trip to London. All main attractions are reachable on foot like St. Elizabeth’s Cathedral, the Technical Museum and the Garden. Free Wi-Fi is available. Kosino International Airport can be reached in less than 10 kilometres.

    and column A and B of file B is like below:
    personal XXXXX
    centrally located OOOOO
    on foot YYYYY


    So if there's no OOOOO and YYYYY in N3 of file A, then the result I need in the cell U3 of file A is : centrally located,on foot

    and the macro does this up to the last valid column N of file A and shows on the column U of file A.

    Thank you so much for taking a look at it and I would appreciate it a lot if someone can help me with this. : )

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: VBA macro that can examine if translation of certain words is done right.

    Hi,

    Would you attach your two files so that we can see the request in context, and with real data.

    No need to attach big files so delete any repetitive rows. Just make sure there is a representative example of all your permutations.
    Manually add some test results with a brief note as to how you've arrived at them with reference to specific sheets/ranges.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    10-12-2013
    Location
    SH
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: VBA macro that can examine if translation of certain words is done right.

    Thank you so much. I've attached two files.

    But I just added two more columns in file B.
    the reason is if possible, I want the macro to examine not only column B of file B but also column C and D.

    for example, cell A9 of file B is "furnished" and cell B9 is "VVVVV", cell C9 "VVVV2", cell D9 "VVVV3"

    and if there's a word " furnished" in M2 of file A and there's "VVVV2" in M3 instead of "VVVVV", it is OK.
    But if there's a word " furnished" in M2 of file A and there's no "VVVVV","VVVV2" or "VVVV3", then cell U3 says "furnished"

    hope it's easy to understand with files attached.

    Thanks a lot again.
    Attached Files Attached Files
    Last edited by Hoonjin; 12-16-2013 at 06:27 AM.

  4. #4
    Registered User
    Join Date
    10-12-2013
    Location
    SH
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: VBA macro that can examine if translation of certain words is done right.

    Thanks a lot, Richard Buttrey.
    I've just attached two files.

  5. #5
    Registered User
    Join Date
    10-12-2013
    Location
    SH
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: VBA macro that can examine if translation of certain words is done right.

    I attached the two files.

    Thank you so much.


    Quote Originally Posted by Richard Buttrey View Post
    Hi,

    Would you attach your two files so that we can see the request in context, and with real data.

    No need to attach big files so delete any repetitive rows. Just make sure there is a representative example of all your permutations.
    Manually add some test results with a brief note as to how you've arrived at them with reference to specific sheets/ranges.

  6. #6
    Forum Contributor
    Join Date
    11-05-2013
    Location
    Germany
    MS-Off Ver
    Excel 2013
    Posts
    120

    Re: VBA macro that can examine if translation of certain words is done right.

    Hi Hoonjin,

    I tried to understand what you want to do but there are a lot of questions before someone can help you achieve what you had in mind.

    I did exactly what you described but If you want it to run automatically for all the words in file B it is important to know how you want this to work.

    Do you want every second row of File A (M3,M5,M7...) to get checked against the entire list ?


    I attached a file where I tried to do it first just the way you asked it to work but I consolidated the file in one workbook. Its a hassle to work with it otherwise and when the code is finished the way you want it is no problem to change it so its for 2 workbooks.

    Hope that helps a bit.


    File A + B.xlsm

  7. #7
    Registered User
    Join Date
    10-12-2013
    Location
    SH
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: VBA macro that can examine if translation of certain words is done right.

    Hi Decar,
    Thank you so much. It's great!
    But I want every second row of File A (M3,M5,M7...) to get checked against the entire list at a shot as you said.
    It's no problem with consolidating them.

    Hoonjin


    Quote Originally Posted by Decar View Post
    Hi Hoonjin,

    I tried to understand what you want to do but there are a lot of questions before someone can help you achieve what you had in mind.

    I did exactly what you described but If you want it to run automatically for all the words in file B it is important to know how you want this to work.

    Do you want every second row of File A (M3,M5,M7...) to get checked against the entire list ?


    I attached a file where I tried to do it first just the way you asked it to work but I consolidated the file in one workbook. Its a hassle to work with it otherwise and when the code is finished the way you want it is no problem to change it so its for 2 workbooks.

    Hope that helps a bit.


    Attachment 284518

  8. #8
    Forum Contributor
    Join Date
    11-05-2013
    Location
    Germany
    MS-Off Ver
    Excel 2013
    Posts
    120

    Re: VBA macro that can examine if translation of certain words is done right.

    Took me a while put good practice.

    let me know how it works


    File A + B V2.xlsm

  9. #9
    Registered User
    Join Date
    10-12-2013
    Location
    SH
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: VBA macro that can examine if translation of certain words is done right.

    Thanks a lot Decar

    But the result is different from what I need.
    I attached the file with the result I need.
    Hope it's easy to understand with this file.

    Thanks again.

    Hoonjin
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    10-12-2013
    Location
    SH
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: VBA macro that can examine if translation of certain words is done right.

    Thanks a lot Decar

    But the result is different from what I need.
    I attached the file with the result I need.
    Hope it's easy to understand with this file.

    Thanks again.

    Hoonjin

  11. #11
    Forum Contributor
    Join Date
    11-05-2013
    Location
    Germany
    MS-Off Ver
    Excel 2013
    Posts
    120

    Re: VBA macro that can examine if translation of certain words is done right.

    hmm I try to understand it first. You basically want to test if any of the words in file b in column B to D are included in the string of n3,n5 etc. ?

  12. #12
    Registered User
    Join Date
    10-12-2013
    Location
    SH
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: VBA macro that can examine if translation of certain words is done right.

    Yes.
    For example, N2 has 'friendly','furnished' and 'amenities' and in N3 the each word needs to be translated to 'WWWWW', 'VVVVV' (or VVVV2,VVVV3) and 'GGGGG'(or GGGG2) as it is listed in column B to D of File B.
    So when N2 has certain words of column A, I want the macro to test if N3 has the relevant words of column B.
    And I want it to test all through the last column N.
    Thanks a lot for trying to understand.
    Quote Originally Posted by Decar View Post
    hmm I try to understand it first. You basically want to test if any of the words in file b in column B to D are included in the string of n3,n5 etc. ?
    Last edited by Hoonjin; 12-18-2013 at 02:48 AM.

  13. #13
    Forum Contributor
    Join Date
    11-05-2013
    Location
    Germany
    MS-Off Ver
    Excel 2013
    Posts
    120

    Re: VBA macro that can examine if translation of certain words is done right.

    hmm k. I think I get closer to understanding it now ^^

    I think it can be achieved with 3 loops and the general code would be something like:

    Please Login or Register  to view this content.

    I found that the function instr should work doing this. Did not think its possible but seems like it is

    let me know if this is what you want and what happens when the translation is found to be right or wrong

  14. #14
    Registered User
    Join Date
    10-12-2013
    Location
    SH
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: VBA macro that can examine if translation of certain words is done right.

    hm, sorry for not being able to explain easy and simple. and thx for your patience.
    below is what i want.

    Please Login or Register  to view this content.
    when it finds the translation(N3,N5,N7..) to be right, it does nothing about it but if it finds the translation to be wrong, then it shows which words are wrong by showing the relevant words of column A in the cell U (U3,5,7..)

  15. #15
    Registered User
    Join Date
    10-12-2013
    Location
    SH
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: VBA macro that can examine if translation of certain words is done right.

    Sorry Decar

    I dont think I explained it right.
    Here I attached another file with clearer explanation.
    Thanks
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    10-12-2013
    Location
    SH
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: VBA macro that can examine if translation of certain words is done right.

    I tried it .

    But Code seems not right.

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

  17. #17
    Registered User
    Join Date
    10-12-2013
    Location
    SH
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: VBA macro that can examine if translation of certain words is done right.

    I tried this way,
    But the code seems not right in some parts.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  18. #18
    Forum Contributor
    Join Date
    11-05-2013
    Location
    Germany
    MS-Off Ver
    Excel 2013
    Posts
    120

    Re: VBA macro that can examine if translation of certain words is done right.

    Hey Hoonjin,

    I think I could get this to work but I have no time, sorry. I'm gonna be gone till January.

    I'm gonna have a look at this thread in January again and see if it was solved.

    regards,

    Decar
    Last edited by Decar; 12-20-2013 at 04:52 AM.

  19. #19
    Registered User
    Join Date
    10-12-2013
    Location
    SH
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: VBA macro that can examine if translation of certain words is done right.

    thanks Decar



    Quote Originally Posted by Decar View Post
    Hey Hoonjin,

    I think I could get this to work but I have no time, sorry. I'm gonna be gone till January.

    I'm gonna have a look at this thread in January again and see if it was solved.

    regards,

    Decar

+ 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. Can a macro examine data in a csv greater than 65536 rows
    By endoskeleton in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-09-2011, 07:28 AM
  2. Replies: 0
    Last Post: 08-11-2006, 07:45 AM
  3. Translation to International Excel 4 Macro
    By coder_arun in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-11-2006, 06:53 AM
  4. Programming (macro) breaks due to translation
    By RBeau in forum Excel General
    Replies: 6
    Last Post: 06-06-2006, 04:45 PM
  5. [SOLVED] Excel 4 macro to VBA translation
    By Tom in forum Excel General
    Replies: 1
    Last Post: 09-04-2005, 10:05 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