Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy formating from above row if value is entered
How do i copy cell's formating in column B from column B 1 row above if any
value is entered into same row's cell in column A For example if i enter any value in cell A7 then formating (including conditional formating) of Cell B6 should be copied to cell B7 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy formating from above row if value is entered
Try this in the Sheet module (right-click sheet-tab, view code)
Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo errH If Not Intersect(Range("A2:A65536"), Target(1)) Is Nothing Then Application.EnableEvents = False With Target(1) .Offset(-1, 1).Copy .Offset(0, 1).PasteSpecial Paste:=xlFormats .Select End With End If errH: Application.CutCopyMode = False Application.EnableEvents = True End Sub Regards, Peter T "Mikus" wrote in message ... How do i copy cell's formating in column B from column B 1 row above if any value is entered into same row's cell in column A For example if i enter any value in cell A7 then formating (including conditional formating) of Cell B6 should be copied to cell B7 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy formating from above row if value is entered
This does not work !
I copied my workbook he www.svara-kontrole.lv/Job_queue.xls Can anyone debug this... why does this is not working ? Example from job_queue.xls - i want to copy formating from B16 To B17 if A17 contains value. Note A17 contains Formula, but it should not be treated as value ... i want this to triger if there real value in A17 ! "Peter T" wrote: Try this in the Sheet module (right-click sheet-tab, view code) Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo errH If Not Intersect(Range("A2:A65536"), Target(1)) Is Nothing Then Application.EnableEvents = False With Target(1) .Offset(-1, 1).Copy .Offset(0, 1).PasteSpecial Paste:=xlFormats .Select End With End If errH: Application.CutCopyMode = False Application.EnableEvents = True End Sub Regards, Peter T "Mikus" wrote in message ... How do i copy cell's formating in column B from column B 1 row above if any value is entered into same row's cell in column A For example if i enter any value in cell A7 then formating (including conditional formating) of Cell B6 should be copied to cell B7 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Visual to copy format one row down when data entered | Excel Discussion (Misc queries) | |||
Copy last data entered into mulitiple sheets within a workbook? | Excel Discussion (Misc queries) | |||
Conditional Formating working when data is entered later | Excel Worksheet Functions | |||
Copy formula automatically down when date is entered | Excel Discussion (Misc queries) | |||
Cannot copy or move array entered formulas ... shared workbk | Excel Worksheet Functions |