I have an excel sheet with the following formula:
=('Forecast Workings'!T2+'Forecast Workings'!T3)/1000-4.6
=('Forecast Workings'!T4+'Forecast Workings'!T5)/1000-4.6
=('Forecast Workings'!T6+'Forecast Workings'!T7)/1000-4.6
How can I write this formula so that I can simply drag this down to fill in the rest of the values and that I get the value to increment by 2 each time?
If your initial cell is in first row and you want to multiply you could use:
=(INDIRECT("Forecast Workings!T"&ROW()*2)+INDIRECT("Forecast Workings!T"&ROW()*2+1))/1000-4.6
Subtract value from ROW() if you are not in the first row.
try,
=sum(index('Forecast Workings'!T:T, (row(1:1)-1)*2+2),
index('Forecast Workings'!T:T, (row(1:1)-1)*2+3))/1000-4.6
You will need a helper column, or use indirect and then use a mathematical approach on the formula row() to get the right return. as an example if you start this in row 2 and drag down this will increment by two. (assuming row one are titles)
=INDIRECT("'Forecast Workings'!T" & (ROW()-1)*2)+INDIRECT("'Forecast Workings'!T" & ((ROW()-1)*2)+1)/1000-4.6
I would also advise to check out the code of conduct, you would need to show what you have tried to solve this yourself and what did not work.
Related
I have searched the Net and tried multiple solution which never worked. You are my last hope.
I have a table like that:
NAMES.......... VALUES
A...........................4
A...........................1
B...........................4
B...........................3
B...........................2
B...........................1
C...........................4
C...........................3
As you can see, the first column has names only where the second one values.
Both Names and Values often repeat them self.
The idea is to TAG the names (first column) with the MIN value taken from the second column.
So the correct result should be:
NAMES.......... VALUES
A...........................1
B...........................1
C...........................3
I am trying to do that through Excel using the INDEX+Match formula where I am trying to add a MIN formula without success:
=MIN(INDEX($D$25:$D$36,MATCH(C25,$C$25:$C$36,0),1))
I have put the MIN everywhere but none seems to work. Which is the correct syntax and if this is not the right solution, which formula might do the job?
Thank you for your time and help
With data in column A and B, in C1 through C3 enter:ABC then in D1 enter the array formula:
=MIN(IF(A$1:A$100=C1,B$1:B$100,""))
and copy down:
Array formulas must be entered with Ctrl + Shift + Enter rather than just the Enter key. If this is done correctly, the formula will appear with curly braces around it in the Formula Bar.
If the data never changes, a Pivot Table is easier to implement.
Two non-array alternatives.
With the newer MINIFS function.
=minifs(d:d, c:c, c25)
Using INDEX in its array format but entered as a standard formula,
=min(index((d$25:d$36)+(c$25:c$36<>c25)*1e99, , ))
In OpenOffice Calc / LibreOffice Calc, I need to find out if a cell in the row below the current cell is empty. To do this, I use the ISBLANK() function.
For example,
ISBLANK(B5)
That works well, but I need the function to be generic to always look at the row below the current row. For example in row 4, I need to be looking at cell B5, and in row 5, I need to be looking at cell B6.
In pseudo-code, this is: ISBLANK(B[row below the current one])
For reasons beyond the scope of this question, I can't just extend the formula to autofill the correct rows.
Can this be done in OpenOffice or LibreOffice? If so, how?
=ISBLANK(INDIRECT(ADDRESS(ROW() + 1,COLUMN())))
ROW() + 1 gives the row number below the current row.
COLUMN() gives the current column.
ADDRESS() followed by INDIRECT() gets the actual cell of that row and column.
Or this, which is closer to your pseudocode:
=ISBLANK(INDIRECT("B" & ROW()+1))
I have a situation where I need to calculate ontime vs. late in a range of cells.
I use the if statement =IF(N2>K2 +30,"Late","") and this works fine however I would like to combine the countif statement to count the range of cells that contain "late"
Thanks
Try this:
=SUM(IF(N:N>K2+30,1,0))
Enter it as array formula by pressing CTRL+SHIFT+ENTER.
updated if you only need to count the number of lates.
As per Roberto's comment, if you are actually using a formula to put "Late" in column L for each relevant row you can use a simple COUNTIF to count those
=COUNTIF(L:L,"Late")
or if you want to use the source data in column N just use COUNTIF with that
=COUNTIF(N:N,">"&K2+30)
I have this formula in Excel, in row E5:
=SUM(Banco!H$5;Banco!H$6;Banco!H$8;Banco!H$9;Banco!H$10;Banco!H$11)
I need it to change the COLUMN references instead of ROWS when I drag it down (basically behave like I was dragging it across)... For example:
=SUM(Banco!I$5;Banco!I$6;Banco!I$8;Banco!I$9;Banco!I$10;Banco!I$11)
=SUM(Banco!J$5;Banco!J$6;Banco!J$8;Banco!J$9;Banco!J$10;Banco!J$11)
=SUM(Banco!K$5;Banco!K$6;Banco!K$8;Banco!K$9;Banco!K$10;Banco!K$11)
Any clues?
Thanks a lot!
... Use the offset function.
For example - Suppose you had a formula in row 1 and you wanted to reference Banco!H5, you could do something like:
=OFFSET(Banco!$G$5,0,ROW())
Now, as you drag it down, it will offset by the number of rows down you go.
So your new formula would look as follows:
=SUM(OFFSET(Banco!$G$5,0,ROW()),OFFSET(Banco!$G$6,0,ROW()),OFFSET(Banco!$G$8,0,ROW()),OFFSET(Banco!$G$9,0,ROW()),OFFSET(Banco!$G$10,0,ROW()),OFFSET(Banco!$G$11,0,ROW()))
Again, this assumes you are pasting this formula in row 1 (I know it's ugly, but you specified specific cells, so you have to specify each one separately)
Hope this makes sense
Use a combination of the OFFSET and the COUNTA function. The OFFSET function will give the offset of COUNTA columns each time you go down a row. Make the counta function count the number of rows above the row that you're dragging the entire function into (aka each time you drag the function to an extra row, it will add 1)
I have two columns of numbers. Both are 1 to 5. I want to count all the cells where the left column value equals the right column value AND the left column value equals a certain value.
I tried this:
=SUM(IF(W2:W13=X2:X13 AND W2:W13=4,1,0))
I've tried pressing Ctrl+Shift+Enter and it adds {} around the formula but that didn't help either.
I think it's the W2:W13 = 4 part that doesn't work
=COUNTIFS(W2:W13,"=4", X2:X13, "=4")
You can use the sumif() function:
SumIf( range, criteria, sum_range )
it will apply the criteria for each row in the range.
Edit: to count the matches, you can use sum_range = 1 or use the Countif() function suggested by Ben in his answer
Have you considered a third column (C) with the formula IF(A1=B1,1,0) and then summing that third column?
I'm not much of an Excel Expert, but didn't they craeted the COUNTIF(range, criteria) function for this?
Add a third column eg Z2:Z13 with this formula: IF(AND(W2=X2; W2=4); 1; 0)
Then sum that one.
I don't have Excel 2007. So here's how you can do it in Excel 2003:
=COUNT(IF((W2:W14=4)*(X2:X14=4),Y2:Y14))
Since you are looking for a specific value and the column next to it to be the same value, you can just compare both columns to the same value.
The trick to get this to work is after entering the formula you need to hit F2 to go into edit mode and then hit CTRL-SHIFT-ENTER which makes this formula an array formula. This will put {} around the entire formula. Without making this an array formula this formula won't work.
I found this information in the Excel help document titled Count how often a value occurs