Test Cell for Value of 1st letter and Insert Shape (Check Mark)

John.McLaughlin

Board Regular
Joined
Jul 19, 2011
Messages
162
Hello!

My cell contains an Index Match, I want to test for the .Value of the Index Match, then insert a Check Mark. My statement keeps testing the formula.

Code:
Range("A12").Select
 If (Left(A12, 1) = "_") Then
    ActiveSheet.Pictures.Insert( _
        "C:\Images\Red-Checkmark.png").Select
 Else
 End If


The column is simple checklist populated by a product code. Almost every product has a different number of items to check off. I only want to insert the checkmark in the cells containing the 1st character "_", the underscore,

e.g.

____ Widget 1
____ Widget 2

Any ideas? Thanks in advance!
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
62,562
Office Version
  1. 365
Platform
  1. Windows
How about
VBA Code:
 If (Left(Range("A12"), 1) = "_") Then
 
Solution

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
62,562
Office Version
  1. 365
Platform
  1. Windows
You're welcome & thanks for the feedback.
 

John.McLaughlin

Board Regular
Joined
Jul 19, 2011
Messages
162

ADVERTISEMENT

Now I am researching how to indent the shape. (checkmark) It places the checkmark in the left most position, any suggestions to move the shape in 1 space?

Thanks in advance!
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
62,562
Office Version
  1. 365
Platform
  1. Windows
As that's a totally different question, it needs a new thread. Thanks
 

John.McLaughlin

Board Regular
Joined
Jul 19, 2011
Messages
162
Sorry, I got excited and posted the new question without thinking :)

I may just edit the graphic!

Fluff, your knowledge and kindness is appreciated!
 

Forum statistics

Threads
1,141,707
Messages
5,707,979
Members
421,539
Latest member
zuniBM

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
Top