Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
copy and paste.
I have a spreadsheet (shift patterns) which have cells populated with a value.
What I want to do is, if the cell value = "" then copy a 7 cells which are populated with different colours. there are 10 different patterns. I want the finished spread sheet to display a colour in each cell which equals a specific work pattern, i.e a red cell equals a 8 until 5 shift pattern. Any help would be very much appriciated. Gary |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
copy and paste.
Gary,
You could use the worksheet's change event to do that. For example, make up the ten sets of seven colored cells with the formatting that you want, and name them FormatSet1, FormatSet2,..... FormatSet10. If your cells "populated with a value" are in column A, code like this will copy the sets of formatting and paste the formatting when you type in the 1, 2, .... 10 (you could use any value in the name that you like....) Copy the code, right-click the sheet tab, select "View Code" and paste the code into the window that appears. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count 1 Then Exit Sub If Target.Column < 1 Then Exit Sub On Error Resume Next Range("FormatSet" & Target.Value).Copy Target(1, 2).PasteSpecial xlPasteFormats Target(2, 1).Select End Sub -- HTH, Bernie MS Excel MVP "Gary" wrote in message ... I have a spreadsheet (shift patterns) which have cells populated with a value. What I want to do is, if the cell value = "" then copy a 7 cells which are populated with different colours. there are 10 different patterns. I want the finished spread sheet to display a colour in each cell which equals a specific work pattern, i.e a red cell equals a 8 until 5 shift pattern. Any help would be very much appriciated. Gary |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can't Copy and Paste or Paste Special between Excel Workbooks | Excel Discussion (Misc queries) | |||
Copy and paste versus copy and insert copied cells | New Users to Excel | |||
Copy/Paste how to avoid the copy of formula cells w/o calc values | Excel Discussion (Misc queries) | |||
Excel cut/Paste Problem: Year changes after data is copy and paste | Excel Discussion (Misc queries) | |||
I cannot paste from one workbook to another. Copy works, paste do. | Excel Discussion (Misc queries) |