Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Excel 2010 Compare Columns

Posted on 2013-01-22
3
Medium Priority
?
215 Views
Last Modified: 2013-01-22
I have an inventory spreadsheet that contains two columns that use VLOOKUP to find a discount multiplier. One column contains standard discount multipliers and the other special negotiated multipliers that only apply to certain items. Some of the items in the special negotiated multipliers contain #N/A because they only have a standard discount.

I want to add a column that will compare the two columns and take the lower multiplier but only when there is values in each column. If the special discount column contains #N/A it should show the standard discount.

How can I do that?
0
Comment
Question by:eseinc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 93

Assisted Solution

by:Patrick Matthews
Patrick Matthews earned 1000 total points
ID: 38806485
Assuming that the first pair of standard and special factors is in B2:C2, use this array formula:

{=MIN(IF(NOT(ISNA(B2:C2)),B2:C2,""))}

Do not type in the curly braces.  Use Ctrl+Shift+Enter and not just Enter to finish it off.

(If you really need the higher value, then use MAX instead of MIN.)
0
 
LVL 23

Accepted Solution

by:
NBVC earned 1000 total points
ID: 38806694
or a regular formula...

=IF(ISNA(C2),B2,MIN(B2:C2))

where column C contains the specially negotiated, and column B the standard discounts...
0
 
LVL 93

Expert Comment

by:Patrick Matthews
ID: 38806967
If only one of the columns can have an #N/A error, then NB_VC's simpler construction would work well.  If either column can have an #N/A, then you may need the array formula after all.

:)
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question