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
I think you might want something like:
=TRANSPOSE(FILTER(Sheet1!A1:Z100, Sheet1!A1:Z1>=$B$1, Sheet1!A1:Z1<=$C$1, "") )
but if you only want certain rows from sheet1 then add a CHOOSEROWS() like:
=TRANSPOSE(FILTER(CHOOSEROWS(Sheet1!A1:Z100,1,4,6,7), Sheet1!A1:Z1>=$B$1, Sheet1!A1:Z1<=$C$1, "") )
=TRANSPOSE(FILTER(Sheet1!A1:Z100, Sheet1!A1:Z1>=$B$1, Sheet1!A1:Z1<=$C$1, "") )
but if you only want certain rows from sheet1 then add a CHOOSEROWS() like:
=TRANSPOSE(FILTER(CHOOSEROWS(Sheet1!A1:Z100,1,4,6,7), Sheet1!A1:Z1>=$B$1, Sheet1!A1:Z1<=$C$1, "") )
- KIMTI nullDec 14, 2023Copper ContributorThank you for the response. It works well, if I want my sheet 2 (new sheet) to show me the data in columns. I want the sheet 2 to show the data in rows only. for example.
05-Oct-23
331620
First Aid
Fall
Next data set
07-Oct-23
331739
Near Miss
Trip
next data set and so on- mtarlerDec 14, 2023Silver Contributoryou 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)- KIMTI nullDec 14, 2023Copper ContributorThank 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.