Excel - How to get value from location specified in different cell - excel

I'm trying to retrieve value located in different spreadsheet which would be easy if I could link it.
But my links are partially build with formulas:
In cell a1 i have this:
="C:\spreadsheets\lists\shopping\"&C1&"\"&A5&"\"&P5&"\["&C2&" Shopping list March.xlsx]Data'!$GJ$7"
Then I would link to use it in b2 as value from this location (pointed above)
="C:\spreadsheets\lists\shopping\A\B\C\[Second Shopping list March.xlsx]Data'!$GJ$7"
But I cannot find solution how i can make it work as a link instead of text value i'm getting now.
Any help would be appreciated.
Thank you

Related

Generate dynamic images based on the values in a column of data

I'm trying to find a way to automatically generate images in a column based on the values in another column (The application is adding rebar images to an excel file that is exported from BIM software).
I have managed to get dynamic images using the 'define name' tool to define a name with the following formula:
=INDEX(Sheet1!$B$2:$B$4;MATCH(Sheet1!$F$2;Sheet1!$A$2:$A$4;0))
I have linked an image to this formula to make it dynamic. However I am stuck on the last step, where I want to apply this principle to an entire column where each image is based on the value in column F in its corresponding row. I have tried adjusting the formula to
=INDEX(Sheet1!$B$2:$B$4;MATCH(Sheet1!$F$2:$F$500;Sheet1!$A$2:$A$4;0))
But this did not change the behavior.
I was hoping to have the column of dynamic images change based on the cell next to it (so if I paste the column of dynamic images in column G I want the image in G5 to be based on the value in F5, G6 based on F6, ...)
All the images are however based on the value in F2.
What I want to achieve
Sample file: https://wetransfer.com/downloads/94a6b73b1bd8408638f614c4bd965dee20191031090453/e01ddc
I am having the same issue. I know you need to use image links. Indirect might work, but I haven't figured it out yet.
This is the only thing that I have found but it would require a defined name for each row:
computergaga.com/blog/create-a-picture-lookup-in-excel
Let me know if you find something better

Add cell values having particular text

First, I know that DSUM and SUMIF works with the values in the entire cell. I would like to know if I can add values of cells where part of the string contains a particular text.
Let me explain. I use Google Sheets to manage my expenses, and gather data about my financials. I have something like this—
As you can see, above is a typical example of a day. Each cell has a category, and a description, and below it, the value in the next row. Now is it possible to add values of the cell containing the word "TAXIS"? This way I should be able to get a sum of expenses for a particular category.
I've tried a vast number of expense managers, but none that I am happy with. Finally have decided to go the manual route, and here I am. Any help would be appreciated. Thanks in advance!
You can use wild card to add part of string. Suppose you data starts from C2 cell and data goes like your screenshot then you can use following formula.
=SUMIF(C2:K2,"*TAXIS*",C3:K3)
Obviously you have to customize formula based on your sheet from where data starts and ends.

Loop through column, search for text, get value of X

I would like to create a CommandButton macro in excel to determine if the name is the same with the one I'm searching for and if it is the same I will be getting the value of the cell beside it and add it all together to get the final amount.
This will be the example that I would like to do:
this will be the flow:
I will first check if the cell value is the same with the name
If it is James I will get the amount and add it to the total value for James, same goes for Ramirez
After everything is checked the accumulated value will then be placed on the cell beside James/Ramirez's name
Is there a way to do this in Excel? or any faster way to do this without using a commandbutton?
You don't need to use marco for this.
You can simply type in a function
In the example shown below,
E2:=SUMIF(A2:A6,D2,B2:B6)
E3:=SUMIF(A2:A6,D3,B2:B6)
EXPLANATION
=SUMIF(range_where_the_keyword_will_be,term_to_search,corresponding_values)
If you type "Ramirez" in D2, E2 will give you "300".
TIPS
If you want it to give you a message (such as, "not existing"), when you type in a name that is not in the list, you can try the function below.
=IF(COUNTIF(A2:A6,D2)<>0,SUMIF(A2:A6,D2,B2:B6),"Not existing")

Change the file reference in a formula using the content of another cell

I need help with a formula (or macro) please.
On the printscreen below ColA and Row1 are copied in via a macro and cells c2 down and right are formulas.
The problem I have is when Row1 is copied in next time the project names might change (say a new one called "100 Project") and I will need to change the filename in the formulas in C5 onwards.
I don't want to use INDIRECT as I can't have 70 or so files open.
Is there a formula I can use please or does anyone have a macro that'll do the job?
Printscreen
Show us a full circle of what you want to use, what you want to do with it and what the end result should look like. (you can reference the screenshot provided) as I'm not quite clear of want you want to do and don't want to guess.
In any case:
=CELL("filename",A1) should help you with current file name however you rename the document you work on.
Other than that you can import however many filenames you have on a list without needing to open them. We will expand on that should it be needed.
PS Based on updated info:
=INDIRECT(CONCATENATE("'",$C$3,"'","!","A",ROW()))
The reference to make that formula work is C3
This is integrated instead of your
" 'g:\it\capex\2015 etc etc tec ... Plan'!$B$20:$B$119 "
C3="C:\folder\[filename.xlsx]sheet name"
(derived by formula or however you want - the result shows the address)
If you want to put in the sheet name independently or more flexibly simply add one more ,references for it to the concatenation.
Either adjust the formula to accommodate your C3 or adjust your c3 to accommodate the formula its fairly simple = you can do it more easily when you remove the INDIRECT and see what remains as text. Get the correct text running through that and you can need correct reference. You can use the general idea to create dynamic address lists that you can reference from 1 location. Further more vba can pull names from directories so you can compile an active list, leaving you with little to no manual work... Yes - most people usually frown upon crafting location addresses in formulas and usually tell you to reorganize your work files, but some times its necessary to access files ad-hoc on value based references.

Excel Data Validation Source

I've tried searching, but maybe just haven't found the right combination of key words and have been unable to find a solution.
What i'm trying to do in Excel is generate a dynamic validation list based on a key value entered in another cell.
I have 3 worksheets: WSName(Columns)
Log (Buildings, Floors)
Buildings (BuildingId, BuildingName)
Floors (FloorId, BuildingId, FloorName)
I have created a named range for all my building ids called "BuildingIds"
I have created separate named ranges for all floors by building called "Floor#BuildingId#"
What I want is, when a Building is selected in the Log worksheet, the Floor list gets dynamically populated with the available floors for that building from the Floors worksheet.
My thought was in the Data Validation Source I should be able to do this:
=INDIRECT("Floors"&$A$2)
And it partially works, but always returns the same floors list because $A$2 isn't dynamic depending on the row it's in, so I need $A$2 to use the value from the current row.
This returns the value of the selected building that I want for the current row:
=INDIRECT("A"&ROW())
But when I try:
=INDIRECT(CONCATENATE("Floor","A"&ROW()))
OR
=CONCATENATE("Floor",INDIRECT("A"&ROW()))
I get an error.
Can you help me with this formula please?! Thanks in advance!
You use incorrect syntax - that's how manual link looks like:
='Sheet 1'!A1
Add exclamation and ' and you're done. The rest seems fine for me)
Ok, I've got this working, I simply set the Data Validation Source to:
=INDIRECT(CONCATENATE("Floors",A2))
Then when the formula was copied over the entire column, the A2 updated to the current row as expected.
#Peter L. Thanks for your help!

Resources