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
Solved

Comparing multiple columns for multiple values - Excel

Posted on 2012-04-02
1
298 Views
Last Modified: 2012-04-02
I can use IF(or(......   to compare a column for multiple values.  Is there a way to compare multiple columns for multiple values.

Example:
If column_ A or column_b or column _c or column_d is equal to ('60', '61', '72','75','88', '95')
Then column_E =1
0
Comment
Question by:morinia
1 Comment
 
LVL 46

Accepted Solution

by:
Martin Liss earned 500 total points
ID: 37797620
If CheckValue(column_A) or CheckValue(ccolumn_B) or CheckValue(column_C) Then
    column_E = 1


Public Function CheckValue(intValue As Integer) As Boolean
   
    Select Case intValue
        Case 60, 61, 72, 75, 88, 95
            CheckValue = True
    End Select
   
End Function

You'll need to make sure column_A, etc actually refers to the value in the range.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

789 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