I have an excel worksheet that contains a series of formulas in F2:F4. Cell F2 contains the formula =Sheet3!Z4, cell F3=Sheet3!Z6, cell F4=Sheet3!Z8. I able to successfully account for the +2 in rows when I drag the formula down by using this offset formula.
=OFFSET(Sheet3!$Z$4,(ROW()-2)*2,0)
Is it possible to alter this formula so that I can drag across the columns and down the rows? For example, if I dragged across from F2 to G2, G2 would return =Sheet3!AA4, but if I dragged from F2 to F3, I would still be able to get =Sheet3!Z6. I can't unlock the Sheet3!$Z$4 in the formula above to drag across columns because if I tried to drag down the rows, my reference number would keep changing which would throw off the entire formula. Does anyone know how to rewrite this formula so that excel can recognize the pattern (+2 in rows, +1 in columns) I'm trying to copy when I drag the formula? Thanks in advance!
try this in F2 then drag down and right,
=index(Sheet3!z:z, (row(1:1)-1)*2+4)
Related
I have to calculate the value of cells A1 till A10 and it takes values from M21, N21, O21, and so on till V21.
How can I write a formula to calculate the same?.
I tried =M$21 to keep row 21 constant, but while dragging the formula down from A1 till A10, it doesn't change the column ref as it's dragging down.
How can I change the column reference to change while dragging the formula down from A1 till A10?.
I would index across the columns based on the current row:
=INDEX($M$21:$V$21,ROW())
use in google sheets:
=INDIRECT(ADDRESS(21, ROW(A13))
dragging this down will give you N21, O21, P21, etc.
I want to be able to copy my formula from cell B4 into cells C4,D4,etc. so that the cell reference to B18 changes to B19, B20, etc. and the table column continues to reference [date].
I've tried referencing the cells in different ways, but I am having no such luck. When I try to drag the formula horizontally from cell B4 to cell C4 the reference to cell $B18 doesn't change but the table column that's being referenced changes from [date] to [platform].
The formula is =IFERROR(INDEX(Table1,MATCH($B18,Table1[date],0),2),"")
Does anyone know how I can adjust my formula to do this, or is there a different way to write it all together to make this easier?
You can lock cell references with a double bracket for table columns [[field]:[field]]
=IFERROR(INDEX(Table1,MATCH($B18,Table1[[date]:[date]],0),2),"")
Further to my previous question, Im trying to get cell E20 (Total) to work similarly - sum all cells preceeding until the the formula itself (E20), again to avoid any cells being excluded as rows are added. So far i have:
=SUM(INDEX(E:E,ROW()+1):INDEX($E:$E,ROW() + IFERROR(MATCH(“TOTAL",INDEX(D:D,ROW()+1):$D1004001,0)-1,MATCH(“TOTAL”,INDEX(D:D,ROW()+1):$D1004001,0)-1)))
So far I am simply returning an error message.
I am trying to sum everything in column E until it reaches one cell above the word Total in column D, to avoid a circular reference. Any thoughts?
Screenshot of workbook
No volatile or array formulas needed:
In E2:
=IF(F2="",SUM(INDEX(F:F,ROW()+1):INDEX(F:F,MATCH(1E+99,F:F)))-SUM(INDEX(E:E,ROW()+1):INDEX(E:E,MATCH(1E+99,F:F))),"")
And copy down the Column. Then a simple sum formula at the bottom
E2:
=AGGREGATE(9,6,(OFFSET(F3,0,0,
AGGREGATE(15,6,ROW(F3:F999)/ISBLANK(F3:F999),1)-ROW(F3))))
Copy/Paste into E8 and E14. The formula for the Total is pretty simple:
E20:
=SUM(E$2:E19)
After entered as indicated, these formulas will auto-adjust when you insert or delete rows in between, because they use relative references.
There's probably better ways, but this will work. I In cell E2, =SUMIF(F1:F7,"<>""""",F1:F7) and similarly in cell E8, etc. The range intentionally includes blank lines above and below each block of data, to ensure that Excel will adjust for any lines that you insert or delete.
For E20 you can just use the same format, =SUMIF(E1:E19,"<>""""",E1:E19)
I am trying to add values in Column B based on data in Column A. Additionally I am looking to remove duplicates from Column A in a separate output on another sheet. Here is how the data looks:
Excel Screenshot
I've tried SUMIF and VLOOKUP based on some similar posts but neither have worked. I know I could use remove duplicates manually but would like to have a formula solution such that the data is automatically consolidated.
Thank you in advance.
You can do this using formula to avoid manual consolidation, try the below set of formulas
In the cell A2, enter the below formula
=IFERROR(INDEX($F$2:$F$7, MATCH(0, INDEX(COUNTIF($A$1:A1, $F$2:$F$7), 0, 0), 0)), "")
In the cell B2, enter the below formula
=if(A2="","",SUMIF($F$2:$F$7,A2,$G$2:$G$7))
The $F$2:$F$7 and $G$2:$G$7 references in the above formulas are the data. If it is from different sheet, then you may need to replace these accordingly.
Once you enter the same in A2 and B2, copy the same in rest of the rows, and you will get what you want.
I have 2 sheets in my spreadsheet. Sheet2 pulls information from Sheet1. In sheet2, there are 2 columns. Column A has company names. Column B has a formula which searches for the company name of that row within sheet1, and sums the values from that row in sheet1.
I have been able to achieve this with the following formula.
=SUMPRODUCT((Sheet1!B:B=A1)*(Sheet1!F:F))
This works fine, however I have to manually type "A1" into the formula. For the other rows, I would have to write B1, C1, D1 etc.
I have searched for how to reference the cell to the left, and I found this formula...
=OFFSET(INDIRECT(ADDRESS(ROW(), COLUMN())), 0, -1)
This seems to work as a standalone formula in a cell, but I cannot figure out how to incorporate this into the SUMPRODUCT formula. Anything I try gives errors. I need something like this.
=SUMPRODUCT((Sheet1!B:B=(=OFFSET(INDIRECT(ADDRESS(ROW(), COLUMN())), 0, -1)))*(Sheet1!F:F))
As per pnuts' suggestion to make it an answer:
The answer is just to drag the formula around. Just make sure to fix (either use F4 or add dollar signs) your range if it is not an entire column or an entire row