Named Locations

MrDB4Excel

Active Member
Joined
Jan 29, 2004
Messages
348
Office Version
  1. 2013
Platform
  1. Windows
Following are two searches I have done to hopefully find an answer to the search questions.
How to set fill color within a named location when an Excel named location is selected & Apply a fill color to an Excel named location when it is selected.
Neither one seemed to give me what I needed to make this happen, so here goes, Xl2bb attached.
The crux of this issue is simply that when I select a cell that has a hyperlink to a set of cells (a named location) on another sheet I want the named location that becomes active per the hyperlink just selected to show a fill color.
Then when I go back to the first sheet that contains the single cells with hyperlinks to named locations then the named location just visited becomes no fill color.
In other words, on the destination sheet (SpaceImageArray) with many named locations, only the one just selected on the source sheet (Space_Images) links to the named location on SpaceImageArray and thus becomes the filled or highlighted color of my choice. Only the cells and has no effect on the image in that location. When I leave that page by picking on an image that links back to cell A1 on the Spave_Images sheet then the previous named location fill becomes no fill.
Finally, these Xl2bb attachments are only a very small indication of how I am using this in a different workbook that contains hundreds of picture images, images of PDFs, and many other associated files that this workbook is a database for, namely visas, passports, and other such relevant data, thus why I created this bogus workbook showing space images. The end result is the same no matter whether it is this space image workbook or my other workbook.

Obviously, the second Xl2bb attachment did not bring with it the inserted images so the attached image will suffice to show you what it really looks like.

Named Locations Fill Color.xlsx
ABCDEFGHI
1KB SizeFile TypeFile NameFolder LocationsConcatenation of Columns "C" & "F"1Images
255.jpg1452110008798.jpgF:\Jpg\Space\F:\Jpg\Space\1452110008798.jpg#11:1: 1452110008798.jpg
364.jpg1453393562887.jpgF:\Jpg\Space\F:\Jpg\Space\1453393562887.jpg#12:2: 1453393562887.jpg
443.jpg1453929916073.jpgF:\Jpg\Space\F:\Jpg\Space\1453929916073.jpg#13:3: 1453929916073.jpg
551.jpg1487863488332.jpgF:\Jpg\Space\F:\Jpg\Space\1487863488332.jpg#14:4: 1487863488332.jpg
650.jpg1487863512851.jpgF:\Jpg\Space\F:\Jpg\Space\1487863512851.jpg#15:5: 1487863512851.jpg
733.jpg1487863547878.jpgF:\Jpg\Space\F:\Jpg\Space\1487863547878.jpg#16:6: 1487863547878.jpg
878.jpg1487863567493.jpgF:\Jpg\Space\F:\Jpg\Space\1487863567493.jpg#17:7: 1487863567493.jpg
9191.jpg462977main_sun_layers_full.jpgF:\Jpg\Space\F:\Jpg\Space\462977main_sun_layers_full.jpg#18:8: 462977main_sun_layers_full.jpg
1082.jpg463940main_atmosphere-layers2_full.jpgF:\Jpg\Space\F:\Jpg\Space\463940main_atmosphere-layers2_full.jpg#19:9: 463940main_atmosphere-layers2_full.jpg
Space_Images
Cell Formulas
RangeFormula
F1F1=COUNTA(#REF!)
E2:E10E2=CONCATENATE(D2,C2)
F2:F10F2=HYPERLINK(E2,"#1")
B2:B10B2=RIGHT(C2,4)
I2:I10I2=G2&": "&C2


Cell Formulas
RangeFormula
B2B2=H2
D2D2=H5
F2F2=H8
H2:H10H2=Space_Images!I2
B16B16=H3
D16D16=H6
F16F16=H9
B30B30=H4
D30D30=H7
F30F30=H10
 

Attachments

  • SpaceImagesToXl2bb (Custom)2 (Custom).png
    SpaceImagesToXl2bb (Custom)2 (Custom).png
    108.3 KB · Views: 10

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
I am writing a reply to myself in the hopes of bringing further understanding of what I am trying to accomplish.
If I were to rename this post it would be: Fill Color When Named Range Becomes Active

Following are several searches I have done today in hopes of finding a solution. So far the only solution I found involves VBA and while it seems to work just fine I was hoping for a non-VBA solution.
How to cause all cells that belong to a named range to highlight only when selected
When a named range becomes active how to show this named range with a fill color
How to show the named range with fill color when this named range is active
How to set Fill Color When Named Range Becomes Active
Excel Checkbox: If Checked then Change Cell Color
How to run a VBA code from selecting a single cell

This just seems to be a simple solution involving the use of formulas but I am thinking this is not possible.
I select one cell in the Space_Images Sheet that then jumps to the named range on the SpaceImageArray Sheet indicated in the hyperlink of that one cell but also contains a formula to cause the jumped to named range to set a fill color.
Then when that named range becomes active all cells in that named range changes to the fill color of my choice.
When leaving that named range on the SpaceImageArray Sheet and going back to the source sheet, Space_Images, then that named range on the SpaceImageArray Sheet returns to no fill color.

The VBA code I found does item #s 1 & 2 but does not do item #3, leaving the named range with no fill color but instead leaves the recently acquired named range the color indicated by the code when I navigate away from this destination sheet:

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
Sh.UsedRange.Interior.ColorIndex = 0 'change colorindex to select background color
Target.Interior.ColorIndex = 8 'change colorindex to select active cell color
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,900
Messages
6,175,276
Members
452,629
Latest member
SahilPolekar

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