Need Color for each Arrow

sksanjeev786

Well-known Member
Joined
Aug 5, 2020
Messages
883
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi Team,

Facing some challenges in the below data
I have concat the arrow from A8:A10 to A13 and I need color for each Arrow under A13 based on the A8:A10 (Red, Blue, Grey)

I believe this requires Macro can anyone help me with this:)


% data.xlsx
ABCDEFGHIJKLMNOPQR
1
2Step 4: Column Labels:ABCDEFGHIJXYZO
3Column Description (from Data):H-E-B_Partner In-Store – MarketH-E-B_Partner In-Store – SeafoodH-E-B_Favor-Beer and WineH-E-B_Favor-True Texas BBQH-E-B_Favor-BloomH-E-B_Shop the World of HEB MarketH-E-B_Shop the World of HEB SeafoodH-E-B_Shop the World of HEB ProduceH-E-B_Own Brand To Texas Football With LoveH-E-B_Curbside and DeliveryEdges Deli0%HEB NORM (SUBNET)COMPETITIVE NORM (SUBNET)TOTAL NORM (NET)0%
4Q.
5Yes52 XYZ39 Y32 Y292935 Y38 Y48 YZ38 Y52 XYZ44 BCDEFI2537 CDE
6
7Wingdings 3 Font
8Red arrow  
9Blue Arrow  
10Grey Arrow    
11
12
13Need Outputꜛꜛꜛꜜꜛꜜꜛꜜꜜꜜꜜꜜꜜꜛꜛꜛꜜꜛꜛꜛꜛ
14
15
16Examapleꜛꜛꜛ
17
Arrow (3)
Cell Formulas
RangeFormula
B8:K8B8=IFERROR(IF(FIND(B$2,$M5),$R$1),"")&IFERROR(IF(FIND($M2,B5),$R$2),"")
B9:K9B9=IFERROR(IF(FIND(B$2,$N5),$R$1),"")&IFERROR(IF(FIND($N2,B5),$R$2),"")
B10:K10B10=IFERROR(IF(FIND(B$2,$O5),$R$1),"")&IFERROR(IF(FIND($O2,B5),$R$2),"")
B13:K13B13=B8&B9&B10
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
try

VBA Code:
Sub ColorArrows()
    Dim R, i As Long, j As Long, k As Long, strArrow As String, color As String, colors
    R = Range("B8:K10")
    colors = Array("", 3, 5, 16)
    For j = 1 To 10
        strArrow = ""
        color = ""
        For i = 1 To 3
            If Len(R(i, j)) > 0 Then
                strArrow = strArrow & R(i, j)
                color = color & i
            End If
        Next
        Cells(13, j + 1) = strArrow
        For k = 1 To Len(color)
            Cells(13, j + 1).Characters(Start:=k, Length:=1).Font.ColorIndex = colors(Mid(color, k, 1))
        Next
    Next
End Sub
 
Upvote 0
try

VBA Code:
Sub ColorArrows()
    Dim R, i As Long, j As Long, k As Long, strArrow As String, color As String, colors
    R = Range("B8:K10")
    colors = Array("", 3, 5, 16)
    For j = 1 To 10
        strArrow = ""
        color = ""
        For i = 1 To 3
            If Len(R(i, j)) > 0 Then
                strArrow = strArrow & R(i, j)
                color = color & i
            End If
        Next
        Cells(13, j + 1) = strArrow
        For k = 1 To Len(color)
            Cells(13, j + 1).Characters(Start:=k, Length:=1).Font.ColorIndex = colors(Mid(color, k, 1))
        Next
    Next
End Sub

Perfect!!!! You are Awosomeeeeeeeeeee:)

Thank you so much Sir:)

Regards,
Sanjeev
 
Upvote 0

Forum statistics

Threads
1,214,971
Messages
6,122,520
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top