Need help with auto populating arrows-

rawr19911

Board Regular
Joined
Jan 21, 2020
Messages
91
Office Version
  1. 2016
so i have a spread sheet- (chart) that i am using and on there they are to show impacts- and the arrow needs to be either yellow purple based on what condition is met- and they need to be up down or left and right .. not sure how to write the macro for this or even how to start- was hoping someone could help.
the arrow are for - if its a customer impact it is purple if its employee its yellow-
if its a enhancement its up if its a disruption its down
if its a natural impact its left and right arror

the enhancment or disruption or nutural impact is in column C
the customer/employee impact is in column D
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Are you putting this in a table or on a chart?

If it's a table you can put this function in a module:
VBA Code:
Function Arrows(ByVal state As Variant)

Select Case True
Case Application.WorksheetFunction.IsNumber(state) = False 'traps other than numbers
    Arrows = ""
Case state > 0
    Arrows = ChrW(&H21E7) ' up arrow
Case state = 0
    Arrows = ChrW(&H21E8) ' right arrow  &H21E6 for left arrow
Case state < 0
    Arrows = ChrW(&H21E9) ' down arrow
Case Else
    Arrows = ""
End Select

End Function

And then put this formula in the column you want the arrows in, pointing to the D column and fill the column.
Excel Formula:
=Arrows(D2)

You can then use Conditional Formatting based on the E column to get your yellow and purple.
 
Upvote 0
Solution

Forum statistics

Threads
1,223,246
Messages
6,170,999
Members
452,373
Latest member
TimReeks

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