Excel: How to edit external link from datasheet cell - excel

I want to edit external link with cell value on excel,
Example
I am getting B1 value from LIST in TT001.xlsx on file TEST.xlsx as below;
='D:\FILES\[TT001.xlsx]LIST'!B1
I want to change link from a cell in file TEST.xlsx link as below;
='D:\FILES\['$A$1'.xlsx]LIST'!B1
Can you help me for the right syntax on above?

Related

Get file path from excels cell

I need help how to get the file path from excel woorbook.
Path is save it in Cell C3 in excel sheet1.
And I want it with my macro code to get that particular value from Cell C3 that I have in excel and set it to S1.
example:
Now my code work like this:
' Set s1 = Workbooks.Open(Filename:="C:\Users\25012023\master_NEW.xlsx")
But I don't wanna to fix that path name here in the module.
I wanted to be more dynamically.
I save it that path in excel cell , but now I don't know how to get the value from there.
I tried with this?
Set s1 = ThisWorkbook.Worksheets("Sheet1").Range("C3").Value
But without any success.
Suggestions?
Not sure if this is what you are looking for, but this formula will produce a dynamic file path/name in Excel. Simply enter this formula into cell A1 (substitute that cell address for another of your choosing:
=LEFT(CELL("filename",$A$1),FIND("[",CELL("filename",$A$1),1)-1)
I use this frequently when I need a dynamic way of getting the file name and path for Power Query for files that are on SharePoint.

Pull a hyperlink from a hidden sheet Microsoft Excel

I'm trying to pull a hyperlink from a hidden sheet in excel to be used in combination with an IF command, it means there will be 3 arguments.
=IF(A24="","",VLOOKUP(A24,'Product Data '!$A$2:$AD$213,19,FALSE))
Is this possible?
Please see current formula below. How do I add for the hyperlink to be used in conjunction with the IF command as I only want the link to show if specific text is selected.
TIA
In order to use the HYPERLINK from a cell in another cell, you should write it in the HYPERLINK formula:
Something like this:
=HYPERLINK(IF(1=1,VLOOKUP("www.test.com",'Product Data '!A1:A10,1,0)))
The sheet and whether it is hidden or not is irrelevant.

Excel "Insert shapes" Color change based on cell value

Anyone knows how to Change the color of Shapes("Insert-> Shapes") based on the value of a cell. i could do this with the help of macro. but i now need the same to be done without the help of macro.
Kindly share the formula if anyone can do this.
thanks.
Example how to show the picture of a named range in a ActiveX image control:
Open Excel with a empty Worksheet Sheet1.
Write 0 in A1.
Create a named range using the Name Manager http://office.microsoft.com/en-us/excel-help/define-and-use-names-in-formulas-HA010147120.aspx#BMmanage_names_by_using_the_name_manage
to do so:
open Name Manager
click New
Name= Image
Refers To= =INDEX(Sheet1!$E:$E,Sheet1!$A$1*4+1):INDEX(Sheet1!$E:$E,Sheet1!$A$1*4+4)
OK
close Name Manager
now:
Take a ActiveX Image Control from Developer tab
(http://office.microsoft.com/en-us/excel-help/show-the-developer-tab-HA101819080.aspx)
Controls and put it in the Worksheet.
Overwrite the formula =EMBED(...) in the formula bar with =Image
(the name of the named range). Now, if you change the value in Sheet1!A1,
you should see the cells E[n]:E[m] with n=A1*4+1 and m=A1*4+4 as
picture in the Image Control. Try it by putting values in E1:E20
and change A1.
Now, if you place different shapes over E1:E4, E5:E8, E9:E12,... you
see them in the Image Control by changing the value in A1.
Edit April 2019:
This works using Excel 2007. It does not work in later Excel versions because the ActiveX Image control does not more accept cell ranges as source.
Just tested in Excel 365:
First do the same steps as above but then in last step
now:
Copy four cells of one column (A1:A4 for example) into the clipboard. It is not important from where the cells are coming.
In the sheet where the image shall appear do Home -> Paste -> Linked Picture. A picture showing the copied cells is pasted. And the formula bar shows the formula =Sheet1!$A$1:$A$4 for example.
Overwrite the formula in the formula bar with =Image (the name of the named range). Now, if you change the value in Sheet1!A1, you should see the cells E[n]:E[m] with n=A1*4+1 and m=A1*4+4 as picture in the pasted picture. Try it by putting values in E1:E20 and change A1.
Now, if you place different shapes over E1:E4, E5:E8, E9:E12,... you see them in the pasted picture by changing the value in A1.

Getting Reference (url link) from another cell?

I want to link a cell to an external file. The name of the external file changes daily though.
I created a cell that contains the full address of the external file (C:\Users\Main\Desktop\data\History\02092013.csv)
I then named that cell HistoryFileReference
So then why does this not work?
='HistoryFileReference'!$A$2
When I press enter, a window named "Update Values: HistoryFileReference" pops up, asking me to choose a file.
edit: I don't want to "update links" via excel. Thanks
For this to work you will have to manually put brackets in the file name and then store it as
C:\Users\Main\Desktop\data\History\[02092013.csv] in the cell which you have named as HistoryFileReference
Now open the CSV file and leave it open. Go back to the above sheet and type this formula
=INDIRECT("'" & HistoryFileReference & "02092013'!$A$2")
and press Enter and you are done :)
Caution: Next time you open the file, do not click on Update Links else all the values generated by the above formula will change into #REF! as Indirect doesn't work with close files.
For the sake of an example, I have place a csv file in C:\ as shown in the screenshot below and I am trying to retrieve values from Cell A1

How to open an Excel on a particular cell using a URL

I'd like to have an HTML file with a URL that points to particular cell in local Excel file.
For example using file://temp/Workbook.xlsx#Sheet1!$A$5 opens the Workbook.xlsx spreadsheet with the cursor already at A5 on sheet Sheet1.
Couldn't find a URL format for that.
Is that possible?

Resources