Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Am I doing something wrong here?

Here is my formula:
---------------------------------------------------------------------

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Dim a As Boolean
Dim b As Boolean
Dim c As Boolean
b = Range("Goal1").Value
c = Range("Goal2").Value
a = False
For x = 6 To 53
If c = 0 Then a = False
If Cells(x, 3).Value = 1 And a = False Then
Range(Cells(x, 13), Cells(x, 13)).Value = "1"
Range(Cells(x, 14), Cells(x, 32)).Value = "-"
a = True
b = b - 1
ElseIf Cells(x, 3).Value = 1 And a = True 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 = "-"
a = False
c = c - 1
End If
Next x

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

End Sub

---------------------------------------------------------------------

I want it to subtract from Goal1 or Goal2 everytime it runs that par
of the program but not subtract from those cells. Can anyone help m
with this?

Thanks,
TyeJa

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Am I doing something wrong here?

Tye,

This looks like your previous post on 6/15. Are you still try to se
the team goals ?

Charle

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Am I doing something wrong here?

Because everything is equal right now what I set up on 6/15 works great
I am just trying to tweak it for when one team has more to do than th
other team. Sorry about posting again, I just cant figure it out.

-TyeJae

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

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
What is wrong? robert morris Excel Discussion (Misc queries) 5 February 6th 09 02:37 AM
Insert Calculated Field (wrong Qty*Price = wrong Amount) Edmund Excel Discussion (Misc queries) 8 October 4th 07 12:13 PM
What am I doing wrong? Jeff Excel Discussion (Misc queries) 6 March 6th 05 03:01 AM
What's wrong with this vb? DaveMoore Excel Worksheet Functions 2 February 24th 05 01:29 PM
What is wrong?? willroy[_2_] Excel Programming 1 December 12th 03 01:33 PM


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