+ Reply to Thread
Results 1 to 9 of 9

Comparing to Columns if Less Than a Percentage Yes

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    07-12-2010
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    136

    Comparing to Columns if Less Than a Percentage Yes

    Hello-

    I am working on a spreadsheet to compare year to date sales column A and column B previous year to date sales. I want to compare these columns. If there is a drop in sales by 25% I want the cell to be marked as "Yes" and "No" if not. I have the formula if Column A is less than Column B to show yes/no but I am not sure how to work in the percentage comparison.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Comparing to Columns if Less Than a Percentage Yes

    Maybe
    Formula: copy to clipboard
    =IF((B2-A2)/A2 <-25%,"Yes","No")
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Contributor
    Join Date
    07-12-2010
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    136

    Re: Comparing to Columns if Less Than a Percentage Yes

    Quote Originally Posted by ChemistB View Post
    Maybe
    Formula: copy to clipboard
    =IF((B2-A2)/A2 <-25%,"Yes","No")
    Thank you. If A2= 0 I get a formula error. Any idea?

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Comparing to Columns if Less Than a Percentage Yes

    How do you calculate the percent increase if the original value is 0? Mathematically, it's an infinite percent increase.
    To just have Excel not perform the calculation if A2 is 0, try
    Formula: copy to clipboard
    =IF(A2=0,"", IF((B2-A2)/A2 <-25%,"Yes","No"))

  5. #5
    Forum Contributor
    Join Date
    07-12-2010
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    136

    Re: Comparing to Columns if Less Than a Percentage Yes

    Quote Originally Posted by ChemistB View Post
    How do you calculate the percent increase if the original value is 0? Mathematically, it's an infinite percent increase.
    To just have Excel not perform the calculation if A2 is 0, try
    Formula: copy to clipboard
    =IF(A2=0,"", IF((B2-A2)/A2 <-25%,"Yes","No"))
    Attachment 732981

    So the first column with the formula has the new formula and the second column with the formula has the original formula you provided. Sorry for the confussion.

  6. #6
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,129

    Re: Comparing to Columns if Less Than a Percentage Yes

    Formula=IF(B2=0,"No",IF((A2-B2)/B2>-25%,"No","Yes"))

  7. #7
    Forum Contributor
    Join Date
    07-12-2010
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    136

    Re: Comparing to Columns if Less Than a Percentage Yes

    Quote Originally Posted by josephteh View Post
    Formula=IF(B2=0,"No",IF((A2-B2)/B2>-25%,"No","Yes"))
    Thank you that did it. Obvious now

  8. #8
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,129

    Re: Comparing to Columns if Less Than a Percentage Yes

    You are welcome. Please take a moment to mark the thread as "Solved" using the thread tools menu above your first post. Have a blessed day!

  9. #9
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,129

    Re: Comparing to Columns if Less Than a Percentage Yes

    You may also like to thank everyone by clicking the Add Reputation button at the bottom-left corner of any of the posts of all members who took time to help you.

+ 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. 2 Columns - Compare columns and give a percentage of number of matches
    By Dave1969 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-24-2020, 06:55 AM
  2. Comparing words in sentences by percentage
    By AmazingTrans in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 1
    Last Post: 03-05-2020, 01:12 PM
  3. Replies: 4
    Last Post: 04-25-2019, 05:28 AM
  4. [SOLVED] Percentage results of zero comparing 2 years
    By MariaPap in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-07-2017, 11:52 AM
  5. [SOLVED] Conditional Formatting Comparing Cells Based on Percentage
    By Ksherer in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-08-2015, 08:05 AM
  6. how to get difference percentage when comparing cells from different sheet
    By anandrajagopal in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-21-2014, 03:11 AM
  7. Replies: 4
    Last Post: 07-23-2013, 05:01 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