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: 1
Default Is this possible?

Here is the formula I have right now:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
For x = 6 To 18
If Cells(x, 3).Value = 1 Then
Range(Cells(x, 13), Cells(x, 13)).Value = "1"
Range(Cells(x, 14), Cells(x, 32)).Value = "-"
End If
Next x

Given this information:
C6 = 1
C7 = 0
C8 = 0
C9 = 0
C10 = 1
C11 = 0
C12 = 1
C13 = 0
C14 = 0
C15 = 1
C16 = 0
C17 = 0
C18 = 0

The first time there is a "1" in these cells I want it to run:

For x = 6 To 18
If Cells(x, 3).Value = 1 Then
Range(Cells(x, 13), Cells(x, 13)).Value = "1"
Range(Cells(x, 14), Cells(x, 32)).Value = "-"
End If
Next x

The second time there is a "1" I want it to do this:

For x = 6 To 18
If Cells(x, 3).Value = 1 Then
Range(Cells(x, 13), Cells(x, 22)).Value = "-"
Range(Cells(x, 23), Cells(x, 23)).Value = "1"
Range(Cells(x, 24), Cells(x, 32)).Value = "-"
End If
Next x

Then next time there is a "1" I want it to run the the first formula
and so on back and forth, is this possible?

-TyeJae

--
Message posted from http://www.ExcelForum.com

 
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 08:22 PM.

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"