Just can't figure this out

EVR_99

New Member
Joined
Jan 27, 2011
Messages
25
Sub Week1()
'
' Week1 Macro
'
'
Range("D32:F33").Select
Application.Run "NewPts"
If "(d32+e32+F32).formula<>(d33+e33+f33).formula" Then
End If
ElseIf "(d32+e32+F32).formula=(d33+e33+f33).formula" Then
Range("G32,G33").Select
Application.Run "OT"
ElseIf "(d32+e32+f32+g32).formula=(d33+e33+f33+g33).formula" Then
Range("G32,G33").Select
Application.Run "OT"
ElseIf "(d32+e32+f32+g32).formula<>(d33+e33+f33+g33).formula" Then
End If

Range("E30").Select

End Sub

Thanks,
David
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
I think the problem is your use of quotation marks

Code:
If "(d32+e32+F32).formula<>(d33+e33+f33).formula" Then

all this is doing is

Code:
if (a string variable) then
which makes no sense, as a string variable can't be true/false

I think what you may need to to is describe in words what it is you're trying to do so that we may derive the correct approach from first principles.

HTH
 
Upvote 0

Forum statistics

Threads
1,224,551
Messages
6,179,473
Members
452,915
Latest member
hannnahheileen

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