Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 211
Default Highlighting cells being updated/new data being inputted.

I have to update a sheet every week. Any idea, how to have a column be
highlighted and every cell be un-colored when updated with the new values
inserted, even if the new values of a cell remain to be the same.
--
Best Regards,

Faraz
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,520
Default Highlighting cells being updated/new data being inputted.

Hi Faraz

I assume the sheet is having a header row (Row 1) with the week
number/date..The below Activate event will check for filled cells. If no
cells are filled except Row1 the column is highlighted.

Once you fill data the cell highligtion is taken off. Not sure whether this
is what you are looking for.

Private Sub Worksheet_Activate()
Dim lngCol As Long, lngLastCol As Long
lngLastCol = Cells(1, Columns.Count).End(xlToLeft).Column
For lngCol = 2 To lngLastCol
Columns(lngCol).Interior.ColorIndex = xlColorIndexNone

'If highligtion is based on number of cells filled in that column
If WorksheetFunction.CountA(Columns(lngCol)) <= 1 _
Then Columns(lngCol).Interior.ColorIndex = 15

'OR

'if the 1st row is having dates Highligtion based on dates
If Cells(1,lngCol)Date then Columns(lngCol).Interior.ColorIndex = 15

Next
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count = 1 Then Target.Interior.ColorIndex = xlColorIndexNone
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Faraz A. Qureshi" wrote:

I have to update a sheet every week. Any idea, how to have a column be
highlighted and every cell be un-colored when updated with the new values
inserted, even if the new values of a cell remain to be the same.
--
Best Regards,

Faraz

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 211
Default Highlighting cells being updated/new data being inputted.

XClent idea!

Never had the idea of using Interior.ColorIndex concept!!!

Thanx pal!
--
Best Regards,

Faraz


"Jacob Skaria" wrote:

Hi Faraz

I assume the sheet is having a header row (Row 1) with the week
number/date..The below Activate event will check for filled cells. If no
cells are filled except Row1 the column is highlighted.

Once you fill data the cell highligtion is taken off. Not sure whether this
is what you are looking for.

Private Sub Worksheet_Activate()
Dim lngCol As Long, lngLastCol As Long
lngLastCol = Cells(1, Columns.Count).End(xlToLeft).Column
For lngCol = 2 To lngLastCol
Columns(lngCol).Interior.ColorIndex = xlColorIndexNone

'If highligtion is based on number of cells filled in that column
If WorksheetFunction.CountA(Columns(lngCol)) <= 1 _
Then Columns(lngCol).Interior.ColorIndex = 15

'OR

'if the 1st row is having dates Highligtion based on dates
If Cells(1,lngCol)Date then Columns(lngCol).Interior.ColorIndex = 15

Next
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count = 1 Then Target.Interior.ColorIndex = xlColorIndexNone
End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Faraz A. Qureshi" wrote:

I have to update a sheet every week. Any idea, how to have a column be
highlighted and every cell be un-colored when updated with the new values
inserted, even if the new values of a cell remain to be the same.
--
Best Regards,

Faraz

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
Excel cells randomly don't get updated unless each cell is updated Lost in Excel Excel Discussion (Misc queries) 5 September 29th 08 06:56 PM
Data Changes itself after I have inputted. Funky Excel Discussion (Misc queries) 5 September 27th 07 01:25 PM
Linked cells lose data when updated HELP! Smudge Excel Discussion (Misc queries) 9 September 1st 07 07:04 PM
keeping cells aligned when data is updated vicvega Excel Worksheet Functions 0 April 4th 06 02:30 AM
Highlighting blanks via GO TO SPECIAL is not highlighting blank cells - HELP, I'm totally stuck. Jamie Furlong Excel Discussion (Misc queries) 6 August 28th 05 09:27 PM


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