Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
JHB JHB is offline
external usenet poster
 
Posts: 30
Default If then help.

I have created the following macro, which appears fine to me but does
not run:

Sub setlowest()
'
' setlowest Macro
' Macro recorded 10/3/2008 by John
'
Sheets("Menu").Select


If Range("D33").Value Range("d42").ValueThen Then GoTo getout
Else
Range("D33").Select
Selection.Copy
Range("D42").Select
ActiveSheet.Paste
Range("C33").Select
Application.CutCopyMode = False
Selection.Copy
Range("E42").Select
ActiveSheet.Paste
End If
getout:
End Sub


I am told that there is an "else, but no If". I can see the if, and
have no idea what the issue is. Could someone tell me the
simple..stupid mistake that I am making, please?

Thanks in advance

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:40 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"