Select Case Multiple Conditions

jarvisaurus

Board Regular
Joined
Nov 26, 2010
Messages
52
Is it possible to have multiple select case conditions?

e.g.

Select Case Range("A2").Value & Range("B2").Value

Case 1/1/10 to 3/31/10, 1 to 100

Range("C2").Formula = Range("B2").Value*1000

I have to check multiple columns and the following code doesn't seem to work.

PHP:
Sub TEST_SelectCase()
Dim i As Integer
Dim LR As Long
Dim therange As Range
LR = Range("A" & Rows.Count).End(xlUp).Row
For i = LR To 2 Step -1
Select Case Cells(i, "GU").Value & Cells(i, "K").Value & Cells(i, "W").Value
Case "BLUE", 4 / 1 / 2010 To 4 / 30 / 2010, 1 To 100
Cells(i, "AI").Formula = Cells(i, "X") * 5015
End Select
Next i
End Sub

I want to check values in Columns GU for Blue, Columns K for the date, and Columns W for a value. If all three cells meet the condition the formula as follows. Thanks in advance.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,224,591
Messages
6,179,768
Members
452,940
Latest member
rootytrip

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top