Forum Discussion
KIMTI null
Dec 13, 2023Copper Contributor
Extract data based on date range
I have the datasheet with each data set recorded in the columns (not rows). This data sheet has multiple years (recorded by the date). I need to extract the data (specific rows) to another sheet by t...
mtarler
Dec 14, 2023Silver Contributor
you should be able to use TOCOL to do that so maybe try:
=TOCOL(FILTER(CHOOSEROWS(Sheet1!A1:Z100,1,4,6,7), Sheet1!A1:Z1>=$B$1, Sheet1!A1:Z1<=$C$1, "") , ,TRUE)
=TOCOL(FILTER(CHOOSEROWS(Sheet1!A1:Z100,1,4,6,7), Sheet1!A1:Z1>=$B$1, Sheet1!A1:Z1<=$C$1, "") , ,TRUE)
KIMTI null
Dec 14, 2023Copper Contributor
Thank you again. I used the following formula:
=TOCOL(FILTER(CHOOSEROWS('2.Know'!A1:ZZ100,3,6,8,18), '2.Know'!A3:ZZ3>=$B$1, '2.Know'!A3:ZZ3<=$C$1, ,TURE) ) and it gave me the folllowing error: You have entered too many argument for this function. I appreciate if you can assist further on this.
=TOCOL(FILTER(CHOOSEROWS('2.Know'!A1:ZZ100,3,6,8,18), '2.Know'!A3:ZZ3>=$B$1, '2.Know'!A3:ZZ3<=$C$1, ,TURE) ) and it gave me the folllowing error: You have entered too many argument for this function. I appreciate if you can assist further on this.
- mtarlerDec 14, 2023Silver Contributor
you entered:
=TOCOL(FILTER(CHOOSEROWS('2.Know'!A1:ZZ100,3,6,8,18), '2.Know'!A3:ZZ3>=$B$1, '2.Know'!A3:ZZ3<=$C$1, ,TURE) )
I don't know what that in red at the end is. After that last $C$1 should be the end of the FILTER function with maybe a if not found (e.g. ,"" ) and then should be the end of the TOCOL function with ,,TRUE)
so maybe try:
=TOCOL(FILTER(CHOOSEROWS('2.Know'!A1:ZZ100,3,6,8,18), '2.Know'!A3:ZZ3>=$B$1, '2.Know'!A3:ZZ3<=$C$1, ""),,TRUE)
- KIMTI nullDec 14, 2023Copper ContributorThank you, It worked perfect.
- KIMTI nullDec 14, 2023Copper ContributorSorry, I noticed that the start of new data followed the start of date range, but it did not stop the data on new sheet at the date ranged as specified specified. Data is copied all the to the end of the date in sheet 1.