Sorting Table Issue - Queries shows different results after sorting Table

Trie1977

New Member
Joined
Mar 7, 2022
Messages
22
Office Version
  1. 2019
Platform
  1. Windows
Hello Excellers,

Many thanks to KRice who helped me a lot with a previous question.

I try to search for answers as much as I can before posting a thread, I just couldn't find the answer. This time I have a table. Beside that table are queries. When sorting the table dates for example, the results of the queries become incorrect. I understand why. The order of the dates for let's say the weekly, is important because the query is based on fibonacci levels fromlast week. It is logical when I change the date order, the outcomes are different.

But what is the solution here?

Thanks anyways.

Count_New.xlsx
ABCDEFGHIJKLMNOPQRS
2UNSORTED - THE CORRECT ANSWER
3DateTimeFrameSwingCountDurationBiasRetracementFibRatioWeeklyDailyH4
42018-04-15Weekly6647buy104,9%100,061,8100,0061,8100,0161,8100,00
52018-08-12Weekly171417sell258,1%261,861,8127,0061,8127,0061,8127,00
62018-08-30Daily38111buy69,1%61,861,8150,0061,8150,0061,8150,00
72018-09-16Weekly6365buy37,1%38,261,8161,8061,8161,8061,8161,81
82018-09-20Daily51311buy134,6%127,061,8261,8061,8261,8061,8261,80
92018-12-30Weekly86715sell136,3%127,0100,0261,81100,0261,80100,0261,80
102019-03-10Weekly95010buy109,6%100,0127,0100,02127,0100,00127,0100,00
112019-09-01Weekly142225sell149,7%127,0
122019-12-08Weekly155614buy109,4%100,0SORTED BY DATE (NO FORMULA HERE TO SHOW THE PROBLEM)
132020-03-15Weekly210514sell135,3%127,0WeeklyDailyH4
142021-07-20Daily3376sell65,2%61,861,8100,0061,8100,0061,8100,00
152021-07-30Daily4118buy122,0%100,061,8127,0061,8127,0161,8127,00
162021-08-23Daily38115sell92,7%88,661,8150,0061,8150,0061,8150,00
172021-10-01Daily50111sell131,5%127,061,8161,8061,8161,8061,8161,80
182021-12-08H466321sell157,5%150,061,8261,8061,8261,8161,8261,80
192022-01-12H457815buy87,2%88,6100,0261,80100,0261,80100,0261,80
202022-01-27H43806sell65,7%61,8127,0100,02127,0100,00127,0100,00
212022-03-08H466325sell174,5%161,8
SortTable
Cell Formulas
RangeFormula
K4:K10K4=COUNTIFS($B$4:$B$21,$I$3,$G$4:$G$21,I4,$G$5:$G$22,J4)
O4:O10O4=COUNTIFS($B$4:$B$21,$M$3,$G$4:$G$21,M4,$G$5:$G$22,N4)
S4:S10S4=COUNTIFS($B$4:$B$21,$Q$3,$G$4:$G$21,Q4,$G$5:$G$22,R4)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B4:B9Cell Value=$Q$3textNO
B4:B9Cell Value=$M$3textNO
B4:B9Cell Value=$I$3textNO
B10:B21Cell Value=$Q$3textNO
B10:B21Cell Value=$M$3textNO
B10:B21Cell Value=$I$3textNO
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top