+ Reply to Thread
Results 1 to 3 of 3

Macro to match values

  1. #1
    Registered User
    Join Date
    08-11-2013
    Location
    SA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Macro to match values

    Hi all,

    I need a macro to look up for the specific text in a table and if matched on one cell then compare 3 other cells in the same sheet with 3 cells in another sheet in the same file and if they matched to gather then put that specific text in a corresponded cell.
    Please check the attached file.

    I wrote the formula to do the job. please check columns H and I on sheet1, as an example the formulas in cells h2 will check if cell E2 (in sheet1)=B2(in sheet2) and F2 (in sheet1)=D2(in sheet2) and G2 (in sheet1)=E2(in sheet2) then put the text of H1 in H2.

    But this is just a sample, the real file will be a monster file with thousands of cells. So if I use this formula my computer can not open it. sometimes i need it for columns h up to 500 columns further as an example and the sheets will contain thousands of rows.

    I need a macro to do it automatically. It should be able to understand how many cells and columns are in both sheets, compare the mentioned cells and do the job.

    I really do appreciated in advance.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Macro to match values

    Cross-posted:
    http://www.mrexcel.com/forum/excel-q...ml#post3553868
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    08-11-2013
    Location
    SA
    MS-Off Ver
    Excel 2013
    Posts
    31

    Re: Macro to match values

    Sorry for that, I did not know that. Yes you are right. I post this tread on http://www.mrexcel.com/forum/excel-q...ch-values.html and http://stackoverflow.com/questions/1...up-and-compare as well. So please help with this macro.
    All the best.
    Last edited by siroos12; 08-22-2013 at 02:41 AM.

+ 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 match values and format cell colour in several sheets
    By lindafinlay in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-21-2013, 01:53 AM
  2. [SOLVED] Tweaking Macro to match and find two cell values not just one
    By Zawoooo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-16-2012, 06:51 PM
  3. Macro for match and replace cell values between 2 workbook
    By ramton in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-19-2012, 01:06 AM
  4. Macro to match values in 2 colums ,write matches
    By ricklou in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-03-2012, 01:55 PM
  5. Macro to match 2 values and change a corresponding cell value
    By Tbomb65 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-29-2012, 09:53 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