I use this procedure to add values to wsR from wsMembers
I’ve depleted my brain attempting to incorporate formatting of those values If conditions exist…
I’m not sure if my references are correct, but something like:
If wsMembers.Range C2.Offset(, 16).Value =< 4 Then
wsR.Range A3.Font.Italic = True
Or, if Member’s Cell S =< 4 Then
Italicize the value placed in wsR
Or, If Member’s Cell N = “” Then
Add the value in wsR AND “*”
Doable? Or, should I just write and call another module after this procedure?
I’ve depleted my brain attempting to incorporate formatting of those values If conditions exist…
I’m not sure if my references are correct, but something like:
If wsMembers.Range C2.Offset(, 16).Value =< 4 Then
wsR.Range A3.Font.Italic = True
Or, if Member’s Cell S =< 4 Then
Italicize the value placed in wsR
Or, If Member’s Cell N = “” Then
Add the value in wsR AND “*”
Doable? Or, should I just write and call another module after this procedure?
Code:
Dim Cl As Range
Dim sKey As String
Dim wsR As Worksheet
Set wsR = Sheets("R")
Set wsMembers = Sheets("Members")
With CreateObject("scripting.dictionary")
For Each Cl In wsMembers.Range("C2", wsMembers.Range("C" & Rows.Count).End(xlUp))
sKey = Trim(Cl.Value)
If sKey <> "" Then
.Add sKey, Cl.Offset(, 15).Value
End If
Next Cl
For Each Cl In wsR.Range("A3", wsR.Range("A" & Rows.Count).End(xlUp))
sKey = Trim(Cl.Value)
Cl.Offset(, 1).Value = .Item(sKey)
End If
Next Cl
End With