Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi everyone,
I've been given an excel spreadsheet that has all the invalid values colour coded. eg red cells if the value is too small, green if too big, yellow if subject moved during reading. etc- so some are numeric and some not. To transfer the data to a statistical package I need to replace all values in shaded cells with blanks. Any suggestions? Thanks in advance Excel Ignoramus sue |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi sue:
Enter and run this smal macro: Sub marine() For Each r In ActiveSheet.UsedRange If r.Interior.ColorIndex = xlNone Then Else r.Value = "" End If Next End Sub -- Gary's Student "sue" wrote: Hi everyone, I've been given an excel spreadsheet that has all the invalid values colour coded. eg red cells if the value is too small, green if too big, yellow if subject moved during reading. etc- so some are numeric and some not. To transfer the data to a statistical package I need to replace all values in shaded cells with blanks. Any suggestions? Thanks in advance Excel Ignoramus sue |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Sue,
This one should work. Sub clearcells() 'clears cells from the active sheet Dim rCell As Range For Each rCell In ActiveSheet.UsedRange If rCell.Interior.ColorIndex < xlColorIndexNone Then rCell.Clear End If Next rCell End Sub -- Hope this helps Martin Fishlock Please do not forget to rate this reply. "sue" wrote: Hi everyone, I've been given an excel spreadsheet that has all the invalid values colour coded. eg red cells if the value is too small, green if too big, yellow if subject moved during reading. etc- so some are numeric and some not. To transfer the data to a statistical package I need to replace all values in shaded cells with blanks. Any suggestions? Thanks in advance Excel Ignoramus sue |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Dear groupies(?),
Just back from holidays and tried your macros . Worked beautifully. Even managed to adjust macro to do it for every sheet in my work book. Gave you an excellent rating. Many thanks and happy new year. sue |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy/Paste how to avoid the copy of formula cells w/o calc values | Excel Discussion (Misc queries) | |||
Condensing a list/range with blank cells to a new list/range without blanks | Excel Worksheet Functions | |||
Using Excel, how do I replace cells containing blanks with nulls? | Excel Discussion (Misc queries) | |||
How To Use Cells Without Values in a Formula | Excel Worksheet Functions | |||
Count number of shaded cells | Excel Discussion (Misc queries) |