Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm not sure if VLOOKUP() is the function I am looking for, but here is the spreadsheet that I am working on: https://docs.google.com/spreadsheet/ccc?key=0Ap96QeCBYRNtdDlpX0lONDg1YThLN1M5YkNlT1FBeFE
What I am basically trying to do is use the values in cells E18:P18 to determine whether or not my values in cells E4:P7 should be replaced or not. If there is a value other than 0 in that range, then it should take the values from the appropriate column in the range of E13:P16 and replace them into the appropriate item.
So, for this example, we are replacing item values 1 (weapon #1), 3 (off-hand), 4 (helm), and 5 (shoulders). The expected results can be seen on the spreadsheet and these are the values that I would like to show up in the Equipped Item. Is there a way to easily achieve this through an excel formula? If so, what is the best way to use it?
After our discussion, here's what I think you should do.
In the Expected Results table, try this formula out in cell E31:
=IFERROR(INDEX($E$17:$P$20,ROWS($1:1),MATCH(VLOOKUP(E$30,$A$4:$B$17,2,FALSE),$E$22:$P$22,0)),E4)
Once you paste it in, you can copy down and the formula will adjust accordingly.
Here is a picture of the expected results based on your info:
Please let me know if this is the desired result :)
Related
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I create a random number in my excel sheet (using RAND), 5 for example. Now I want to reference column A[my number], in this example its A5. How would I do that?
If thats not possible, is it possible to get a random row value from a column?
Thanks!
=INDIRECT("A"&RANDBETWEEN(1;10)) will randomly return cell in range A1:A10.
Usually INDEX is preferable to INDIRECT (it's not volatile and you don't need to "hardcode" the column reference). If you have your random number in B3 try
=INDEX(Data!A:A,B3)
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I'm working on a spreadsheet where I would like to be able to sum a certain number of cells automatically. E.g. I put in 120 or 100 in my reference cell and Excel then gives me the sum of the top 120 or 100 cells in my revenue column. Is there a way to do this? I've thought about simply naming the range of cells like "top120revenue" and "top100revenue" etc. but besides being static it is also complicated when working with 27 sheets. If a formula exists it would be easier to simply change the sheet reference instead of relabeling the range of cells. Maybe the answer lies in VBA but I'm by no means an expert there
Hope someone can help!?
Do you mean the top n cells positionally or the n highest values? If it's the former I would use INDEX which is a little more robust than INDIRECT i.e.
=SUM(A1:INDEX(A:A,B1))
If you mean the n largest values then try
=SUMPRODUCT(LARGE(A:A,ROW(INDIRECT("1:"&B1))))
I think I found the answer to your question here. It uses the function INDIRECT().
For example: if column A holds your data and B1 is your reference cell containing the value 100, then the formule below gives the sum of the first 100 values of column A.
=SUM(A1:INDIRECT("A"&B1))
This gets interpreted as:
=SUM(A1:A100)
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I need help setting up an Excel-Formula.
I have two tables that I need to compare in order to multiply the currency rate of table2 with the amount of table1 depending on the date of table1 matching the date field of table2.
If you have a look at the screenshot I made I think you will understand what I want to do: Image
Hope you can help me set up a formula for this. If you need the excel-file for testing I uploaded it to zoho. Link
This should do it:
=IF(ISNA(A3*INDEX($F$2:$H$13,MATCH(1,(B3=$G$2:$G$13)*(C3=$F$2:$F$13),0),3)),A3,A3*INDEX($F$2:$H$13,MATCH(1,(B3=$G$2:$G$13)*(C3=$F$2:$F$13),0),3))
Select your cell and put your cursor in the formula bar and press Ctrl+Shift+Enter
PS: thanks to RocketDonkey ;)
In the interest of showing various ways, here is alternative using SUMPRODUCT:
=A2*SUMPRODUCT(--($F$2:$F$13=C2),--($G$2:$G$13=B2),$H$2:$H$13)
If you wanted to handle 0 values differently, you could wrap everything in an IF statement.
=IF(A2*SUMPRODUCT(--($F$2:$F$13=C2),--($G$2:$G$13=B2),$H$2:$H$13)=0,
"Special stuff",
A2*SUMPRODUCT(--($F$2:$F$13=C2),--($G$2:$G$13=B2),$H$2:$H$13))
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have two documents that should share a numeric value that should also increase by one after each time one of the documents are used.
For example:
I open docA.xls and it should say 001.
I'd like to be able to change it to 002 and save.
When I open docB.xls, it should say 002, because docA's value is 002.
I'm pretty sure I can create a third spreadsheet that I could update to update the two cell values, but I'm wondering if there is a way to link cells other
than having a formula that reads =A1.
I realize I could have one workbook with three spreadsheets, as well.
But what is the best way to accomplish this?
Copy the first cell.
Paste on the another sheet as a Paste Special => Paste Link.
One workbook w/ 3 spreadsheets would be the most straight-forward; you can specify which spreadsheet in a cell reference, so both sheets could explicitly refer to the same cell. And if you don't like explicitly using the row/col reference, you could always assign it a name and use that.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I have a excel spreadsheet with dates in one column, and results/values in another column (not next to each other, but on the same sheet). I want to set up a little summary table that will display the last date that had a corresponding result in the results column, since the latest date does not always have results available immediately. I would appreciate any help on this.
You can achieve this with an array formula.
=MAX(IF(B3:B12<>"";A3:A12;0))
Important with an array formula is that you finish entering by Control + Shift + Enter!! The formula will then be automatically enclosed in curly brackets. If you press only enter it will work as a normal formula.
What the formula will do:
The if will go through the range and if the cell content meets your condition then it puts the value from the according cell in the second array into his result array otherwise it puts in 0.
Then the MAX command is working on the resulting array. Important is that the arrays used in the array formula are the same size!