LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 846
Default Can the last two if statements be combined together?

If the user change c4, i want the value of c39 to change or
If the user change e4, i want the value of e39 to change

Is there a better way??

Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Range("c4", "e4"), Target) Is Nothing Then
Application.EnableAutoComplete = True
Else
Application.EnableAutoComplete = False
End If
If Intersect(Range("c4"), Target) Is Nothing Then
Application.EnableAutoComplete = True
Else
Range("c39").Value = Range("c4").Value
End If
If Intersect(Range("e4"), Target) Is Nothing Then
Application.EnableAutoComplete = True
Else
Range("e39").Value = Range("e4").Value
End If

End Sub

 
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


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF STATEMENTS COMBINED WITH VLOOKUPS peggyL Excel Worksheet Functions 2 July 1st 08 09:10 PM
Use of Combined IF and AND statements ConfusedNHouston Excel Discussion (Misc queries) 2 March 11th 08 06:30 PM
Using "If" combined with "AND" statements Roger Bell New Users to Excel 1 November 8th 07 01:59 AM
Combined Statements Don Excel Discussion (Misc queries) 1 May 29th 07 11:24 PM
Conditional formatting combined with multiple IF statements Hendrik Excel Worksheet Functions 7 March 22nd 07 06:03 PM


All times are GMT +1. The time now is 01:10 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"