I have been trying to count Dynamically the number of rows based on Col"B" as available in attached sheet.
Dynamic formula will give Countdown from 1 to onward based on col"B" values, such as
1
2
3
4
5
6
and so on
Any help will be appreciated.
or the logic way:
=INDEX(IF(B1:B="";;ROW(B1:B)))
or from row 2:
=INDEX(IF(B2:B="";;ROW(B2:B)-1))
or like:
=INDEX(ROW(INDIRECT("B1:B"&COUNTA(B1:B))))
Did this do the trick:
=SEQUENCE(COUNTA(B1:B))
Related
I am trying to sum the values in a range only corresponding to the row of current month.
I am using the formula
=sumif(A6:A17 ,"=TEXT(TODAY(),'mmmm')", E6:M17)
A6 to A17 has the 12 months, so I want the sum of row 7 from the range E6:M17
But I am getting 0 as result. Please help.
The function I used as the second argument is no equating to the manual months name in A6:a17.
Here's one approach:
=SUM(FILTER(E6:M17,A6:A17=TEXT(TODAY(),"MMMM")))
I have managed to make this formula:
=IF(COUNTIF($A$1:A1,A1)=$B$1,A1+1,A1)
Is making an incremental list in the same column, starting with 01, and on cell B1 I am instructing how many times this number should repeat (up to 5 times per number). So, if I say repeat 2 times it looks like this:
Column A
1
1
2
2
How can I make it an Array Formula? I'm barely starting on Arrays so I'm just trying to learn as I go.
you can try to solve this with the following formula =ArrayFormula(flatten(if(SEQUENCE(1,C1),SEQUENCE(C2)))) but you should specify the value limit in cell C2 to which the numbers must increase, otherwise the formula will loop
Try this
=ARRAY_CONSTRAIN(arrayformula(query(flatten(split(rept("|"&A2:A,B2:B),"|")),"select * where Col1 is not null")),SUM(B2:B),1)
https://docs.google.com/spreadsheets/d/1qXy-hzWUnsUmAa-8aV5IHOyZABGD_h8ajICLwdyNge8/edit?usp=sharing
Try Sequence() with ROUNDUP() function.
=ArrayFormula(ROUNDUP(SEQUENCE(B1*B1)/B1,0))
When enter 3:
I got into a bit of problem. I have data like this
Date Repeat
7-Oct-2018 1
8-Oct-2018 1
9-Oct-2018 2
10-Oct-2018 2
11-Oct-2018 3
12-Oct-2018 2
13-Oct-2018 1
Now the result i want is a column where the date is repeated as per the repeat numbers, like this.
Result
7-Oct-2018
8-Oct-2018
9-Oct-2018
9-Oct-2018
10-Oct-2018
10-Oct-2018
11-Oct-2018
11-Oct-2018
11-Oct-2018
12-Oct-2018
12-Oct-2018
13-Oct-2018
So how can i get this result. Please do help
I tried to think of it for own study. For example, how about this sample formula? I think that there might be simpler formulas. So please think of this as one of them. When you use this, please put the following formula to a cell.
=TRANSPOSE(SPLIT(JOIN(",",ARRAYFORMULA(REPT(A2:A8&",",B2:B8))),","))
This formula supposes that the values of Date and Repeat are put in A2:A8 and B2:B8, respectively.
Show repeatedly Date using REPT(). At this time, , is used as a delimiter.
Join each cell with , using JOIN().
Split the cell with , using SPLIT().
Transpose the cells using TRANSPOSE().
I think that you can also use CONCATENATE() and TEXTJOIN() for joining cells.
References:
REPT
JOIN
SPLIT
TRANSPOSE
CONCATENATE
TEXTJOIN
how to find a sum of 3 higher values from the range of 6 which are on the one row e.g We have integer values A1:A6 like 2 5 7 4 9 9 It should sum 9+9+7 so 25
Is it possible by any formula or something?
Take a look at the answer Extracting the top five maximum unique values
That should provide you with a basic mechanism (QUERY), to get the top 3 values. Then, apply the SUM function to that result.
So, in your case, you would want:
=SUM(QUERY(A2:A6,"select A order by A desc limit 3",-1))
Here's another one:
=SUM(ARRAY_CONSTRAIN( SORT(A1:A6,1,0),3,1))
Shorter version:
=large(A:A,1)+large(A:A,2)+large(A:A,3)
to apply to an entire column, though A:A could be limited to A1:A6.
I have two columns that I want to test if any of their values matches and count how much of them. For example:
1 2
2 5
3 1
4 7
Should return two, since 1 and 2 are in both columns.
I've found that in excel I could do =SUMPRODUCT(A1:A4=B1:B4), but I can't find the same in Google Spreadsheet. I tried =ARRAYFORMULA(SUMPRODUCT(A1:A4=B1:B4)), but it didn't work.
Thanks for the help!
I think its strange to answer your own question, but since I found the solution..
I archieved it doing =ARRAYFORMULA(SUM(COUNTIF(A1:A4=B1:B4)))