Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 390
Default Arrange code

Hello
I have this code (below) which works perfect.
Option Explicit
Dim nextSecond

Sub startFlashing()
flashCell
End Sub

Sub stopFlashing()
On Error Resume Next
Application.OnTime nextSecond, "flashCell", , False
End Sub

Sub flashCell()
nextSecond = Now + TimeValue("00:00:01")
Application.OnTime nextSecond, "flashCell"


If Range("A105").Interior.ColorIndex = 3 Then
Range("A105").Interior.ColorIndex = 5
Range("A105").Value = IIf(Range("F102") = Range("G102"),
Range("A99"), IIf(Range("F102") Range("G102"), Range("E102"),
Range("H102")))
ElseIf Range("A105").Interior.ColorIndex = 5 Then
Range("A105").Interior.ColorIndex = 3
Range("A105").Value = "CHAMPIONS 2009-2010"
End If
End Sub

Now I need to add something else to it, where if cells F102 and G102 remain
equal, then Range("A105").Value =
Range(J102)Range(K102),Range(E102),Range(H102).
I appriciate even a small help.
Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Arrange code

then Range("A105").Value =
Range(J102)Range(K102),Range(E102),Range(H102).


This needs clarification. Did you want an IIf statement

Or

A105 = The greater of J102 Or Sum(E102, H102, K102)

Or

A105 = Sum(E102, H102, J102,K102) assuming the was a typo.

Or what?






"MAX" wrote in message
...
Hello
I have this code (below) which works perfect.
Option Explicit
Dim nextSecond

Sub startFlashing()
flashCell
End Sub

Sub stopFlashing()
On Error Resume Next
Application.OnTime nextSecond, "flashCell", , False
End Sub

Sub flashCell()
nextSecond = Now + TimeValue("00:00:01")
Application.OnTime nextSecond, "flashCell"


If Range("A105").Interior.ColorIndex = 3 Then
Range("A105").Interior.ColorIndex = 5
Range("A105").Value = IIf(Range("F102") = Range("G102"),
Range("A99"), IIf(Range("F102") Range("G102"), Range("E102"),
Range("H102")))
ElseIf Range("A105").Interior.ColorIndex = 5 Then
Range("A105").Interior.ColorIndex = 3
Range("A105").Value = "CHAMPIONS 2009-2010"
End If
End Sub

Now I need to add something else to it, where if cells F102 and G102
remain
equal, then Range("A105").Value =
Range(J102)Range(K102),Range(E102),Range(H102).
I appriciate even a small help.
Thanks in advance.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Arrange code

I went ahead with the assumption that you wanted an additional ElseIf
statement. This would be inserted just before the End If.


ElseIf Range("F102") = Range("G102") Then
Range("A105") = IIf(Range("J102") Range("k102"), _
Range("E102"), Range("H102"))




"MAX" wrote in message
...
Hello
I have this code (below) which works perfect.
Option Explicit
Dim nextSecond

Sub startFlashing()
flashCell
End Sub

Sub stopFlashing()
On Error Resume Next
Application.OnTime nextSecond, "flashCell", , False
End Sub

Sub flashCell()
nextSecond = Now + TimeValue("00:00:01")
Application.OnTime nextSecond, "flashCell"


If Range("A105").Interior.ColorIndex = 3 Then
Range("A105").Interior.ColorIndex = 5
Range("A105").Value = IIf(Range("F102") = Range("G102"),
Range("A99"), IIf(Range("F102") Range("G102"), Range("E102"),
Range("H102")))
ElseIf Range("A105").Interior.ColorIndex = 5 Then
Range("A105").Interior.ColorIndex = 3
Range("A105").Value = "CHAMPIONS 2009-2010"
End If
End Sub

Now I need to add something else to it, where if cells F102 and G102
remain
equal, then Range("A105").Value =
Range(J102)Range(K102),Range(E102),Range(H102).
I appriciate even a small help.
Thanks in advance.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Arrange code

That got all skewed around, hopefully this will look better and won't wrap
when it posts.


ElseIf Range("F102") = Range("G102") Then
Range("A105") = IIf(Range("J102") Range("k102"), _
Range("E102"), Range("H102"))



"JLGWhiz" wrote in message
...
I went ahead with the assumption that you wanted an additional ElseIf
statement. This would be inserted just before the End If.


ElseIf Range("F102") = Range("G102") Then
Range("A105") = IIf(Range("J102") Range("k102"), _
Range("E102"), Range("H102"))




"MAX" wrote in message
...
Hello
I have this code (below) which works perfect.
Option Explicit
Dim nextSecond

Sub startFlashing()
flashCell
End Sub

Sub stopFlashing()
On Error Resume Next
Application.OnTime nextSecond, "flashCell", , False
End Sub

Sub flashCell()
nextSecond = Now + TimeValue("00:00:01")
Application.OnTime nextSecond, "flashCell"


If Range("A105").Interior.ColorIndex = 3 Then
Range("A105").Interior.ColorIndex = 5
Range("A105").Value = IIf(Range("F102") = Range("G102"),
Range("A99"), IIf(Range("F102") Range("G102"), Range("E102"),
Range("H102")))
ElseIf Range("A105").Interior.ColorIndex = 5 Then
Range("A105").Interior.ColorIndex = 3
Range("A105").Value = "CHAMPIONS 2009-2010"
End If
End Sub

Now I need to add something else to it, where if cells F102 and G102
remain
equal, then Range("A105").Value =
Range(J102)Range(K102),Range(E102),Range(H102).
I appriciate even a small help.
Thanks in advance.





Reply
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
Arrange Footer MAX Excel Worksheet Functions 2 February 8th 10 11:56 PM
vb code to re-arrange data Svenman Excel Programming 10 January 10th 08 02:12 AM
Help with code to re-arrange data for pareto analysis Steve S[_3_] Excel Programming 2 February 23rd 06 06:34 PM
re-arrange text snugs25 Excel Worksheet Functions 1 December 12th 05 01:16 PM
Arrange and Tiled Duncan_J Excel Programming 0 July 1st 05 03:53 PM


All times are GMT +1. The time now is 12:42 PM.

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

About Us

"It's about Microsoft Excel"