+ Reply to Thread
Results 1 to 6 of 6

comparing one column value to another

  1. #1
    Registered User
    Join Date
    01-15-2009
    Location
    boise, idaho
    MS-Off Ver
    Excel 2003
    Posts
    2

    comparing one column value to another

    I have 2 columns of numbers. Columns A and B. column A are loan amounts and column B are property values. I am only interested in the loan amounts that are 75% (or less) of the property values.

    for example

    A divided by B is less than or equal to 75%

  2. #2
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,527
    What do you want to do with the rows that do not meet your criteria i.e., deleted, highlighted or hidden?

  3. #3
    Registered User
    Join Date
    12-15-2008
    Location
    Singapore
    Posts
    38
    Enter this in column C.

    C2=IF(A2>0.75*B2,"not interested","interested")

  4. #4
    Registered User
    Join Date
    01-15-2009
    Location
    boise, idaho
    MS-Off Ver
    Excel 2003
    Posts
    2
    I would like to delete

  5. #5
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,527
    Hi Craig,

    Ultising Andy Pope's code from here, the following macro should do the trick (note my comments as well):

    Please Login or Register  to view this content.
    HTH

    Robert

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531
    I think you could actually use the formula to your advantage such that looping the resulting values is not required... you can use SpecialCells to highlight cells containing Formulae and then subsequently differentiate further based on the resulting values of said formulae (ie Text, Numbers) ... so if you set the formula up such that it returns say a number for a valid result and a text value for those to be deleted you can use SpeicalCells to identify those to be deleted, eg:

    Please Login or Register  to view this content.
    Note in the above any row within the range that does not contain values for A & B is excluded from deletion... you can obviously alter the formula to suit your own needs.
    Last edited by DonkeyOte; 01-17-2009 at 06:34 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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