+ Reply to Thread
Results 1 to 6 of 6

Compare Columns

  1. #1
    Forum Contributor
    Join Date
    02-23-2015
    Location
    Sweden
    MS-Off Ver
    2013
    Posts
    109

    Compare Columns

    Hello people,

    I need help with a code does following:

    loops through Column J and K
    if the values are equal on the same row
    select the Value in Column B and (same row) divided by the value in Column AB (same row) and present the new value -1 in the Column T

    and if there is no value in column B after you find same value in J and K skip. that and continue loop

    Could someone help me?

    Thank you in advance
    Last edited by elmnas; 05-26-2015 at 05:58 AM.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,864

    Re: Compare Columns

    Please Login or Register  to view this content.
    or may be inside loop use also i (not j) to have output in the same row, but then why macro, while formula would do this easily.
    Best Regards,

    Kaper

  3. #3
    Forum Contributor
    Join Date
    02-23-2015
    Location
    Sweden
    MS-Off Ver
    2013
    Posts
    109

    Re: Compare Columns

    I got this code now

    Please Login or Register  to view this content.
    The problem is...

    it says T is missmatch ( I meant of course Column T)
    Last edited by elmnas; 05-26-2015 at 06:11 AM.

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,864

    Re: Compare Columns

    Where?
    its important info not just
    there says its missing a ")"
    it's probably here:
    Please Login or Register  to view this content.
    by the way change also here
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    02-23-2015
    Location
    Sweden
    MS-Off Ver
    2013
    Posts
    109

    Re: Compare Columns

    Run-Time error '11'
    Division by zero

    I also forgot a important thing..


    7oBr7Ik.png

    The values in the J and K are text not numbers.

  6. #6
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,864

    Re: Compare Columns

    Hi,
    values in J and K columns are not responsible for
    Division by zero
    column AB is.

+ 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. Formula to Compare 2 Different Columns on a single Row Multiple Columns
    By dndgeez in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-05-2015, 04:11 AM
  2. [SOLVED] Evaluate to columns; compare two columns and return result
    By kjxavier in forum Excel General
    Replies: 2
    Last Post: 09-25-2014, 04:08 AM
  3. Macro to Compare two columns and publish sheet name in case columns dont match
    By adaws in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-06-2014, 01:21 PM
  4. Replies: 2
    Last Post: 02-05-2014, 07:30 PM
  5. Replies: 6
    Last Post: 05-30-2013, 04:58 PM

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