Is the following possible in Excel?
I want to:
Have cell B change based upon the text value in another cell A in the same row. This cell B actually splits into 2 cells with the same with as the row. We'll now call them Cell B1 and B2. Cell B1 and B2 both now have yellow backgrounds, despite the rest of the row being colored by a different conditional format. Each CellB1 and CellB2 now have checkmark boxes (or equivalent) with a word of text beside them. When checked, the Cell Background goes green.
If the value in cell A changes, Cell B1 and B2 are merged back to just Cell B, which is now empty.
Can this be done with a VBA macro (before I waste time working on it)?
>>59369127
Great.
Now to pretend I actually know how to code.
>>59368635
Did you find a solution?
You don't need to use VBA at all btw, it could be done in a simpler manner.
>>59368635
Can't you just do (in cell b1/b2) '=a1'? Then some conditional formatting/hiding based on the value
>>59368635
>cell B actually splits into 2 cells
You can't split cells, you have to merge them first, so you can treat them as one..Dim i _TMP as Integer
i_TMP = 6
With Sheets(1).Range( "B5:B" & i_TMP )
.VerticalAlignment = xlBottom
.MergeCells = True
End With
>Have cell B change based upon the text value in another cell A in the same row.
You need to catch some event here. For example:Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column = 1 and Target.Row = 1 Then
If Target.Value > 100 Then
Range("B2").Interior.Color = 3
End If
End If
End Sub
>Each CellB1 and CellB2 now have checkmark boxes (or equivalent) with a word of text beside them.
For the "checkbox" you need to set the font to something like "Wingdings", some symbol font. For waht you want you need multiple fonts in your cell:Sheets(1).Cells(2, 2).Characters(1, 2).Font.Name = "Webdings"
Sheets(1).Cells(2, 2).Characters(3).Font.Name = "Arial"
>If the value in cell A changes, Cell B1 and B2 are merged back to just Cell B, which is now empty.
Just as before, catch the event, set Range("B2:B3").MergeCells = False and delete the values with Range("B2:B3").Clear or something like that..
>>59370586
Or he could just have used column C, both on white background (with whatever formula and conditional formatting) and they would be indistinguishable from 1 cell when empty.
OP is just over complicating things.
>>59370650
It's not always the programmer that makes the choices, especially when it comes to office software.
Conditional formatting is nice, but it will only take you so far.