Conditional Formatting to make picture visible? VBA needed?

hinsdale1

Board Regular
Joined
Oct 7, 2011
Messages
60
My brain is starting to hurt from reading/experimenting and am not getting any closer. I was hoping one of the forum geniuses might have pity and lend me a hand?

I would like to make a graphic (same graphic) placed in about 100 cells appear in those cells only (and be invisible otherwise) when the following is true of the cell:

This is the conditional formatting formula:

=IF(ISNUMBER(FIND("F",VLOOKUP(D172,$D$3:$M$166,3,FALSE))),FALSE,IF(ISNUMBER(FIND("+",VLOOKUP(D172,$D$3:$M$166,3,FALSE))),FALSE,IF(ISNUMBER(FIND(":",VLOOKUP(D172,$D$3:$M$166,3,FALSE))),FALSE,TRUE)))

Applies to:

=$D$172:$D$222,$F$172:$F$222,$H$172:$H$222,$J$172:$J$222,$L$172:$L$222

The images (same graphic) are individually named for the cells in which they reside... and are named D172,D173,D175,... F172,F173,F174... etc.

The VBA code is completely stumping me (have to do with VBA right?).. any direction would be welcome and VERY much appreciated. Thanks in advance for any help you can provide!
 
Last edited:
I am sure you hear this often... but you are a genius.

Was really kind of you to help me with this. I am certain you have loads of good karma heading your way; made my day - that's for sure.
 
Upvote 0

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
I hit a snag. The flag images inserted into the over 100 cells are all set in properties to "Dont Move or size with cells" and Locked is checked - but when I sort the rows.. the images move with the cells. I am soo frustrated.

Any ideas how to keep images from moving during sort function?

Otherwise, would a another option be to have sub that inserts the "flag.png" into the cells that meet the Lookup criteria above after the sort is performed? (of course i would have no idea the VBA code to do it)

ANY and ALL help is much appreciated!
 
Upvote 0
Code:
Sub SortOrder()'
' SortOrder Macro
'
' Keyboard Shortcut: Ctrl+x
'


    Range("A172:N192").Select
    ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Clear
    ActiveWorkbook.Worksheets("Sheet1").Sort.SortFields.Add Key:=Range( _
        "N172:N192"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
        xlSortNormal
    With ActiveWorkbook.Worksheets("Sheet1").Sort
        .SetRange Range("A172:N192")
        .Header = xlGuess
        .MatchCase = False
        .Orientation = xlTopToBottom
        .SortMethod = xlPinYin
        .Apply
    End With
       
End Sub

Is there something in my sort subroutine that is overiding the "Do Not Move" property that is assigned to the pictures?
 
Upvote 0
When I manually sort , pictures do not move with cells (as desired), however, when I use any macro to sort.. the pictures move with cells. I need to have the sort perform automatically every two minutes so manual wont work. Can't believe how close this is.. yet so far!
 
Upvote 0

Forum statistics

Threads
1,216,174
Messages
6,129,296
Members
449,498
Latest member
Lee_ray

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