![]() |
#7
|
|||
|
|||
![]()
Oh! I'm so sorry, I forgot to mention that I'm not applying it to just one cell. A2:F2, in which A2 and B2 are merged, C2 is an un-merged cell, D2 and E2 are merged, and F2 is another un-merged cell. So it's actually 4 cells that needs to auto-populate '0'.
I've been editing the code to add in :F2. Is that the error? I'm so sorry I missed this out. Code:
Private Sub Worksheet_Change(ByVal Target As Range) If Not Application.Intersect(Target, Range("A1")) Is Nothing Then If Range("A1").Value = "No" Then Range("A2:F2").Value = 0 Range("A2:F2").Locked = True Else Range("A2:F2").Value = "" Range("A2:F2").Locked = False End If End If End Sub Last edited by YW3; 05-18-2017 at 11:38 PM. |
Tags |
autopopulate |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
patidallas22 | Excel Programming | 9 | 04-21-2014 03:14 PM |
![]() |
heastlund | Excel | 3 | 11-21-2013 12:38 PM |
![]() |
Stevejd58 | Excel | 3 | 08-20-2013 04:23 PM |
![]() |
Stevejd58 | Excel | 14 | 05-13-2013 02:22 AM |
Auto-populate an MS Word table cell with text from a diff cell? | dreamrthts | Word Tables | 0 | 03-20-2009 01:49 PM |