+ Reply to Thread
Results 1 to 8 of 8

Help with a Macro

  1. #1
    Registered User
    Join Date
    07-07-2014
    Location
    Valls, Spain
    MS-Off Ver
    2013
    Posts
    4

    Help with a Macro

    HI, my name is Omar and I am new here...
    my problem is the next:
    I need a macro that compare values from column A (each value) with all the values of colunm C, if it find the same value does nothing but if not it has to put the value of A in C if the C is with the value --.--

    Thanks ¡¡¡¡¡¡

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Help with a Macro

    You get better help if you add an excel file, without confidential information on this forum.

    Please also add the desired result in your sheet.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    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: Help with a Macro

    Hi,

    Why do you think you need a macro when a simple =IF(MATCH()) formula in an adjacent column will test the condition and return the appropriate value. Then if necessary copy the helper column and use Paste Special values to paste back to column C.
    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.

  4. #4
    Registered User
    Join Date
    07-07-2014
    Location
    Valls, Spain
    MS-Off Ver
    2013
    Posts
    4

    Re: Help with a Macro

    Ok, now I am not at home when I come back I am going to add the file, I have tried the function MATCH, but the problem is that I forget to say something, the story is:
    We have column A (new history) and C (old history), B and D are unit columns so, I need to compare and see if the values of A are different from C (some are new) so if the program check the column C and find that the value for example A1 is not in C, has to look for a value in C (--.--, this is the cell value), and the same value of unit, and replace in C.

  5. #5
    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: Help with a Macro

    Hi,

    Post #4 doesn't alter what I said in #3.

    Yes, uploading the file would assist.

  6. #6
    Registered User
    Join Date
    07-07-2014
    Location
    Valls, Spain
    MS-Off Ver
    2013
    Posts
    4

    Re: Help with a Macro

    Ok, I tried it but didn't work I will try it later at home and say something, thanks ¡¡
    Last edited by tgnomar; 07-07-2014 at 07:09 AM.

  7. #7
    Registered User
    Join Date
    07-07-2014
    Location
    Valls, Spain
    MS-Off Ver
    2013
    Posts
    4

    Re: Help with a Macro

    ASK.xlsx

    Hi is me again, I was trying with the function MATCH but I am not able to do it. The file has four columns with old and new histories and the units of both two. I need to look for the new in the old. If the new is not in the old it has to be, so the cell with the same unit and value "--.--" or just without value is the place where it has to be.
    To sum up, at the end I will have only one list with old and news
    Last edited by tgnomar; 07-07-2014 at 12:23 PM.

  8. #8
    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: Help with a Macro

    Hi

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    will find the G value in A and return the value from B.

    If that's not what you expect please add some manually calculated results.

+ 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] Macro to show Which macro didnt work in a nested macro
    By akhileshgs in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-10-2013, 03:21 AM
  2. Perform macro "on open" specific file- store macro in Personal Macro Workbook?
    By thompssc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-17-2012, 12:38 PM
  3. lookup macro, solver macro, realtime macro
    By xelhelp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-02-2011, 06:14 PM
  4. Cannot find macro error when running a macro from a macro in a diffrent workbook.
    By Acrobatic82 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-05-2010, 09:22 AM
  5. [SOLVED] Macro calling another Macro: "The macro 'Personal.xls!FindChar"
    By William Benson in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-07-2005, 09:05 AM

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