Solved

Comparing multiple columns for multiple values - Excel

Posted on 2012-04-02
1
291 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 45

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

758 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now