I need to use an ID in a URL hyperlink like this example:
http://www.wotnots.co.uk/property/images/property2402_image1.jpg
The ID here is 2402. I want to change it to the ID number which is in the first column and is different on every row. I want to have the ID number to be the same as the number in the hyperlink.
I would use the HYPERLINK cell function to generate the link. For example:
Cell A2: 2402
Cell B2: =HYPERLINK("http://www. ... /property" & A2 & "_image1.jpg","Click to see ...")
You can then copy the formula into all of the following rows, and the reference to cell A2 will change to be relative to the current row.
This can also be generated dynamically using VBA code if necessary.
Here you go.
=Concatenate("http://www.wotnots.co.uk/property/images/property",$A1,"_image1.jpg ")
Try the following formula:
="http://www.wotnots.co.uk/property/images/property"&A1&"_image1.jpg"
Related
I am trying to find how to get an excel formula to get a cell's relative reference into a cell.
A formula that would be like =getcellreference(B2) and then has B2 as the output.
Nothing complicated but i could not find a simple solution.
You can use CELL():
=CELL("address",B2)
For formatting to literally show B2 instead of the absolute reference, you can do:
=SUBSTITUTE(CELL("address",B2),"$","")
If all you are trying to do is output a cell reference that you manually input, then all you need to do is:
="B2"
or
B2 (no equals sign)
You can use the ADDRESS function to obtain the address of a cell in a worksheet, given specified row and column numbers
ADDRESS(row_num, column_num, [abs_num], [a1], [sheet_text])
So for cell B2, you will need to put =ADDRESS(2,2) where the first 2 stands for the row number and 2nd is for column B.
I have a formula that pulls data from PivotTable and sums up according to ID:
=SUM(GETPIVOTDATA("Value",$A$3,"AccounID",{5637855, 6839652, 5839670}))
I would like to use the same formula but with a reference:
=SUM(GETPIVOTDATA("Value",$A$3,"AccounID",A1))
When A1 is: 5637855, 6839652, 5839670.
In this case if there is one ID or 10 IDs - it will be the same formula and I can only add an ID in the cell A1.
I am sure that it is possible somehow with Macro, but I want a simple way (since macros in my company are restricted).
I found a few workarounds with SUMPRODUCT and range of cells, but this solution is not practical in my case.
Use this array formula
=SUM(IFERROR(GETPIVOTDATA("Value",$A$3,"AccounID",TRIM(MID(SUBSTITUTE($A$1,",",REPT(" ",99)),(ROW($A$1:INDEX(A:A,LEN($A$1)-LEN(SUBSTITUTE($A$1,",",""))+1))-1)*99+1,99))),0))
Being an array formula it needs to be confirmed with Ctrl-Shift-Enter instead of Enter when exiting edit mode.
All the A1 refer to the cell in which the string is found, EXCEPT the first one in the ROW argument. Leave that as A1 change all the others to the cell in which the string can be found.
Try this:
Option2:
if someone doesn't have the cell A1 restriction`
Create a table (use format as table) with the IDs you want to sum:
[criteria]
| 5637855|
| 6839652|
| 5839670|
Then replace in your formula with the range from your table criteria like:
=SUM(GETPIVOTDATA("Value",$D$1,"AccounID",Table1[criteria]))
and activate the formula as an array with Ctrl+Alt+Enter or Ctrl+Shift+Enter depending your Excel version.
If you highlight Table1[criteria] in the formula and press F9 you will see that the value it is getting is {5637855, 6839652, 5839670}.
I am trying to create a formula which picks ">" or "<" sign depending upon whether any record has "Higher" or "Lower" against it.
For example, if A1 has "Higher", then formula in B1 should be =0.78>0.59
If A2 has "Lower", then formula in B2 should be =0.78<0.59
Try,
if(a1="higher", 0.78>0.59, 0.78<0.59)
'alternate
=or(and(a1="higher", 0.78>0.59), and(a1="lower", 0.78<0.59))
use this as formula.
=IF(A1>B1,">","<") in cell C.
than use this formula to get your desired look in next cell. =CONCATENATE(A2,C2,B2)
You can hide Column C if you don't want to show it.
Check it by clicking following link,
This is sort of a carry on from my previous question. I have a sheet named Car Search which returns the details of a car from the Raw Data sheet when the Car ID is entered (see image 1).
I would like the Notes column to return what is in the Raw Data sheet in that specific cell. This is dynamic; so if the cell was F561, then I would like it to return that exact cell.
So for example, when I enter the Car ID '2613' into the Car Search sheet, I would like column E5 to return the value of the specific cell in the Raw Data tab. (Currently, that cell is F5 which is 'here2').
Is there a formula that can do this? Or am I missing something in the current formula?
My current formula is this: =IF(INDEX('Raw Data'!E:F,MATCH($B$3,'Raw Data'!A:A,0),MATCH(E2,'Raw Data'!1:1,0))="","")
Any help appreciated :)
Try this untested formula:
=""&INDEX('Raw Data'!$F:$F,MATCH($B$3,'Raw Data'!$A:$A,0))
Your Index() formula is searching within E:F, but the column index you supply is actually identical with the column id. So change this to A:Z.
Also, I'd suggest some "$" since it looks like you wish to drag this formula:
=""&INDEX('Raw Data'!$A:$Z,MATCH($B$3,'Raw Data'!$A:$A,0),MATCH(E$2,'Raw Data'!$1:$1,0))
Wrapping it with IF(Result="","",Result) is kind of redundant - it serves no function.
I have 2 worksheets: Summary and SERVER-ONE.
In cell A5 on the Summary worksheet, I have added the value SERVER-ONE.
Next to it, in cell B5, I would like a formula that uses the value in A5 to display the value of G7 in the worksheet of the same name (SERVER-ONE).
I could manually use:
='SERVER-ONE'!G7
However I would like this to be dynamic, so I can easily add more worksheets.
I tried the obvious with no joy:
='A5'!G7
Any suggestions?
You can use the formula INDIRECT().
This basically takes a string and treats it as a reference. In your case, you would use:
=INDIRECT("'"&A5&"'!G7")
The double quotes are to show that what's inside are strings, and only A5 here is a reference.
You need INDIRECT function:
=INDIRECT("'"&A5&"'!G7")
not sure if you solved your question, but I found this worked to increment the row number upon dragging.
= INDIRECT("'"&$A$5&"'!$G"&7+B1)
Where B1 refers to an index number, starting at 0.
So if you copy-drag both the index cell and the cell with the indirect formula, you'll increment the indirect.
You could probably create a more elegant counter with the Index function too.
Hope this helps.
Here is a solution using INDIRECT, which if you drag the formula, it will pick up different cells from the target sheet accordingly. It uses R1C1 notation and is not limited to working only on columns A-Z.
=INDIRECT("'"&$A$5&"'!R"&ROW()&"C"&COLUMN(),FALSE)
This version picks up the value from the target cell corresponding to the cell where the formula is placed. For example, if you place the formula in 'Summary'!B5 then it will pick up the value from 'SERVER-ONE'!B5, not 'SERVER-ONE'!G7 as specified in the original question. But you could easily add in offsets to the row and column to achieve the desired mapping in any case.
By using the ROW() function I can drag this formula vertically. It can also be dragged horizontally since there is no $ before the D.
= INDIRECT("'"&D$2&"'!$B"&ROW())
My layout has sheet names as column headers (B2, C2, D2, etc.) and maps multiple row values from Column B in each sheet.
INDIRECT is the function you want to use. Like so:
=INDIRECT("'"&A5&"'!G7")
With INDIRECT you can build your formula as a text string.
Guess #user3010492 tested it but I used this with fixed cell A5 --> $A$5 and fixed element of G7 --> $G7
=INDIRECT("'"&$A$5&"'!$G7")
Also works nested nicely in other formula if you enclose it in brackets.
This will only work to column Z, but you can drag this horizontally and vertically.
=INDIRECT("'"&$D$2&"'!"&CHAR((COLUMN()+64))&ROW())