Hello dear Excel users,
I have a column range with a formula that is copied. When I insert a new row the references in the formula do not change in the cell above which I have inserted the new blank row. The funny thing is that the references change in the other cells below the row above which I inserted the row.
Here is an example:
I have this formula in row 53 (cell L53)
=IF($O53="Subtotal",SUMIF($AK$40:$AK52,"Subtotal"&(COUNTIF($O$40:$O52,"Subtotal")+1),$L$40:$L52),0)
When I insert a new row above row 53 the formula in row 54 (the old row 53) remains the same while it should change the references from row 52 to 53 respectively. So here is the formula after I insert the new row:
=IF($O54="Subtotal",SUMIF($AK$40:$AK52,"Subtotal"&(COUNTIF($O$40:$O52,"Subtotal")+1),$L$40:$L52),0)
So some of the references have changes while others remain the same.
The formulas on the rows below are corrects:
=IF($O55="Subtotal",SUMIF($AK$40:$AK54,"Subtotal"&(COUNTIF($O$40:$O54,"Subtotal")+1),$L$40:$L54),0)
Any ideas will be much appreciated.
Related
I have formulas for the top 4 rows formula is as follows row 1) C1= A1+B1 row 2 ) C2=A2+B2 row 3) C3=A3+B3 row 4) C4=C3/C1 and the next row is blank ie C5 post which the same continues 4 rows has formula and the 5th row is blank I have a huge data how to copy the formula below please help
Am struck please someone assist
I have skipped the blanks and copied the first four rows selected the below rows and pasted I need any other alternative either by formula or by copy paste
Cell C1
= IFS(MOD(ROW(),5)=0, "", MOD(ROW(),5)=4, OFFSET(C1, -1, 0)/OFFSET(C1, -3, 0), TRUE, A1+B1)
You can calculate all your data using that formula simply. Just double-click or drag the fill handle of cell C1 down to copy the formula.
The easiest way to do this on a very large scale is to just have ONE and ONLY one formula that applies to all cells, so you are copying it all the way down the sheet one time.
I'd do this by looking at ROW() to get the row number, and more specifically, using MOD(ROW(),5) to get a row index that goes 0-4, with 0 being the blank row.
This formula will look back up to previous rows so you will have to "prime the pump" for the first 3 rows manually:
Cell C1 will be =A1+B1
Cell C2 will be =A2+B2
Cell C3 will be =A3+B3
Cell C4 will be =SWITCH(MOD(ROW(),5),1,A4+B4,2,A4+B4,3,A4+B4,4,C3/C1,0,"")
Then copy this cell, C4, down the entire length of the sheet.
My specific formula assumes there's no headers and the values start in row 1.
If not, you just have to move the formulas to the right SWITCH indexes 0-4.
Intended behaviour
Where two values in the same row of two different columns MATCH two values in the same row of two different columns in another sheet, the data in the same row of the third column of the additional sheet is displayed in a third column of the original sheet.
For example...
Where Sheet1 A2 ("1") AND B2 ("A") MATCH Sheet2 A5 ("1) AND B5 ("A"), the value in Sheet2 D5 (1500%) should be displayed in C2 of Sheet1
I have read the below similar questions:
Match two columns in table to two columns in separate table and return value &
Match values in two columns and return value using vlookup from third column in Excel
and tried working them into my spreadsheet but the data I get back is either a "" (blank), "#VALUE" or "#NA"
The below formula seems to be the closest potential resolution but sadly it's spitting out blank from what seems to be an error 🤔
I have also tried the below formula with CSE (Ctrl +Shift + Enter) but nothing 😕
=IFERROR(INDEX(Sheet2!D2:D7, MATCH(Sheet1!A2:A7,Sheet2!A2:A7,0),MATCH(Sheet1!B2:B7,Sheet2!B2:B7,0)),)
Any assistance would be appreciated for this excel noob, thank you :)
You can try this in your Sheet1!C2:
=INDEX(Sheet2!$D$2:$D$7,MATCH(1,(Sheet2!$A$2:$A$7=Sheet1!A2)*(Sheet2!$B$2:$B$7=Sheet1!B2),0))
Sorry if the title is off, but I have no way of making this short.
I have an excel file with 2 sheets: Sheet1 has the first column filled with data, but in a random pattern (ex: 6 consecutive cells are with data, 6 are without, other of the following alternate; basically there is no way of knowing if the next cell has data or not). I want to copy the first column from Sheet1 into Sheet2 without any blank cells or duplicate ones (the order of the data can be maintained or be changed as the result of the formula).
Can this be done without any coding?
Assuming your Sheet1 is as follows
Then in Cell A2 of Sheet2 enter the following formula
=IFERROR(INDEX(Sheet1!A$2:A$50,SMALL(INDEX(NOT(ISBLANK(Sheet1!$A$2:$A$50))*ROW($A$1:$A$49),0),COUNTBLANK(Sheet1!$A$2:$A$50)+ROW($A1))),"")
Drag/Copy down as required. Change range in formula as needed. See image for reference.
EDIT :
To get unique values from Column A of Sheet2 enter below formula in Cell B2 of Sheet2
=IFERROR(INDEX($A$2:$A$20,MATCH(0,INDEX(COUNTIF($B$1:B1,$A$2:$A$20),0,0),0)),"")
Help is appreciated on this issue, thanks!
How can I reference a specific cell from Sheet1 onto Sheet2? The catch is, if I add new rows above row 1, I want Sheet2 to continue referencing the new values in A1. Not the values of A1 that were moved to A2, A3, etc when new rows were added.
I have taken excel courses before but this is my first workbook projectwhere I am applying concepts.
Thanks!
Use Index:
=INDEX(Sheet1!A:A,1)
Now even if rows are added or deleted it will always refer to the first row in Column A.
I use excel 2007
i made a table with few columns but too many rows. Each row contains some data and simple formulas.Now I want to duplicate a specific row based on current date [TODAY()] at top of the sheet.I mean whenever I open the file,the right row according to computer date,be shown directly at somewhere else instead of looking through all rows to find it.
thanks
above your table. add an empty row.
First column add =TODAY() // This will show todays date in the column and can be used in your other formulas. We will assume the cell is A1
Second Column add = VLOOKUP($A$1,A2:D8,2,FALSE) A1 being the date, A2:D8 being the table range (A2 top left cell, D8 bottom right cell), 2 is the second column of your table range, false returns the value in the second column as longs as the date (A1) matches the date in the first column on your table range.
Copy the formaula across the columns, changing the lookup column in the formula. ie. Third column VLOOKUP($A$1,A2:D8,3,FALSE)
Glad to help.