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

x
?
Solved

Comparing multiple columns for multiple values - Excel

Posted on 2012-04-02
1
Medium Priority
?
312 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
[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
1 Comment
 
LVL 49

Accepted Solution

by:
Martin Liss earned 2000 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

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
One of the most important things in an application is the query performance. This article intends to give you good tips to improve the performance of your queries.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

604 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