- To post as a guest, your comment is unpublished.· 4 months agoIf you want to sum referring to a Different Shet In CONCATENATE formula write [ SHEET NAME+COLUMN+ROW]
How to define range based on another cell value in Excel?
To calculate a range of values is easy for most of Excel users, but have you ever tried to calculate a range of values based on the number in a specific cell? For example, there is a column of values in column A, and I want to calculate the number of values in column A based on the value in B2, which means that if it is 4 in B2, I will average the first 4 values in column A as below screenshot shown. Now I introduce a simple formula to quickly define range based on another cell value in Excel.
To do calculation for a range based on another cell value, you can use a simple formula.
Select a blank cell which you will put out the result, enter this formula =AVERAGE(A1:INDIRECT(CONCATENATE("A",B2))), and press Enter key to get the result.
1. In the formula, A1 is the first cell in the column you want to calculate, A is the column you calculate for, B2 is the cell you calculate based on. You can change these references as you need.
2. If you want to do summary, you can use this formula =SUM(A1:INDIRECT(CONCATENATE("A",B2))).
Quickly Count/Sum cells by background or format color in Excel
|In some cases, you may have a range of cells with multiple colors, and what you want is to count/sum values based on same color, how can you quickly calculate? |
With Kutools for Excel's Count by Color, you can quickly do many calculations by color, and also can generate a report of the calculated result. Click for free full featured trial in 30 days!
|Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days.|
You are guest
or post as a guest, but your post won't be published automatically.
- To post as a guest, your comment is unpublished.· 5 months agoCan I use this syntax while referring to a different sheet?
- To post as a guest, your comment is unpublished.· 2 years agoHi,
Thank you so much for your help, but I have a small problem that is I don't have just one column but several ones (about 100 columns) is there a way to change the formula to accommodate the change in columns so O can get the sum for Columns A B C and so on.
thanks for your help
- To post as a guest, your comment is unpublished.· 2 years agoThank u for your message. If you want to sum first n values across multiple continuous columns, just change A to the last column you ues. EG, sum first 5 values across column A to column D, apply this formula =SUM(A1:INDIRECT(CONCATENATE("D",F2))).