Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Clearing row colour & row data


Daily Schedule

Coloumn A is a list of names
Coloumn E is a drop down menu with the options of blank, Sick and AL
Coloumns F-AC are 30min time cells

I have a colour counting macro so what ever colour i change a sell to
will count it as 0.5. I have an update button i press to calculate the
hours once i have put in all the different colours. However if i select
the Sick or AL drop down menu after i've done the colours it greys out
the whole line as i want, but if i update again its still counting the
colours that were should before, i guess this has something to do with
the conditional formating. Is it possible get a macro to delete the
data and cell colour so this doesn't happen?

I have attached my spreedsheet so you can see what i mean


+-------------------------------------------------------------------+
|Filename: MASTER 2006.zip |
|Download: http://www.excelforum.com/attachment.php?postid=5246 |
+-------------------------------------------------------------------+

--
alex1982
------------------------------------------------------------------------
alex1982's Profile: http://www.excelforum.com/member.php...o&userid=37494
View this thread: http://www.excelforum.com/showthread...hreadid=573570

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Clearing row colour & row data

Add this code

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "E26:E72,E74:E87"

On Error GoTo ws_exit
Application.EnableEvents = False
If Not Intersect(Target, Range(WS_RANGE)) Is Nothing Then
With Target
For Each cell In .Offset(0, 1).Resize(1, 24)
cell.Interior.ColorIndex = xlColorIndexNone
Next cell
End With
Call Update
End If

ws_exit:
Application.EnableEvents = True
End Sub

This is worksheet event code, which means that it needs to be
placed in the appropriate worksheet code module, not a standard
code module. To do this, right-click on the sheet tab, select
the View Code option from the menu, and paste the code in.


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"alex1982" wrote in
message ...

Daily Schedule

Coloumn A is a list of names
Coloumn E is a drop down menu with the options of blank, Sick and AL
Coloumns F-AC are 30min time cells

I have a colour counting macro so what ever colour i change a sell to
will count it as 0.5. I have an update button i press to calculate the
hours once i have put in all the different colours. However if i select
the Sick or AL drop down menu after i've done the colours it greys out
the whole line as i want, but if i update again its still counting the
colours that were should before, i guess this has something to do with
the conditional formating. Is it possible get a macro to delete the
data and cell colour so this doesn't happen?

I have attached my spreedsheet so you can see what i mean


+-------------------------------------------------------------------+
|Filename: MASTER 2006.zip |
|Download: http://www.excelforum.com/attachment.php?postid=5246 |
+-------------------------------------------------------------------+

--
alex1982
------------------------------------------------------------------------
alex1982's Profile:

http://www.excelforum.com/member.php...o&userid=37494
View this thread: http://www.excelforum.com/showthread...hreadid=573570



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Clearing row colour & row data


Thanks Bob

you are a sta

--
alex198
-----------------------------------------------------------------------
alex1982's Profile: http://www.excelforum.com/member.php...fo&userid=3749
View this thread: http://www.excelforum.com/showthread.php?threadid=57357

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
Clearing cells without clearing formulas marsjune68 Excel Discussion (Misc queries) 2 April 10th 09 07:39 PM
Clearing Data Troy2006 Excel Discussion (Misc queries) 3 October 31st 08 10:01 PM
can the fill colour of a bar be tied to the data font colour data PaulC Charts and Charting in Excel 0 June 23rd 06 01:21 AM
Clearing unseen data Ralphael1 New Users to Excel 3 December 2nd 05 11:25 AM
VBA Question / Clearing out All Data carl Excel Worksheet Functions 3 March 2nd 05 07:57 PM


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