i want data in this format 1to30,31to183,184to335,335to365 days

sleek12

Board Regular
Joined
May 3, 2014
Messages
71
Office Version
  1. 365
Platform
  1. Windows
am using office 365 , focus is on column B,C and I


mrexcelquestion.xlsx
ABCDEFGHIJ
332D4648268Type D - Motor CycleOpalescent Insurance AgencyBELDINAACHIENG03/11/2023KMGF343N06/11/202305/10/2024335.00Active
333D4648269Type D - Motor CycleOpalescent Insurance AgencyBERYLODHIAMBO03/11/2023KMGD842U############02/11/2024365.40Active
334D4648270Type D - Motor CycleOpalescent Insurance AgencyGEOFFREYMWANGI03/11/2023KMGF933C############02/12/202329.25Active
335D4925956Type D - PSVOpalescent Insurance AgencyBELDINAACHIENG03/11/2023KMGK546D############02/11/2024365.37Active
336C28415854Type C - Private CarPANTHERA INSURANCE AGENCYPerfectInsurance03/11/2023 08:38KCD821R05/11/202304/10/2024335.00Active
337B13282074Type B - Commercial VehicleNelkan Insurance AgencyJanetObiero03/11/2023KAW071G############09/08/2024280.45Active
338C28415855Type C - Private CarPANTHERA INSURANCE AGENCYPerfectInsurance03/11/2023 14:58KBH847Z04/11/202303/12/202330.00Active
339C28463000Type C - Private CarLilian NyamburaMainaNdee03/11/2023 17:11KCL441K############04/05/2024183.29Active
340B13291497Type B - Commercial VehicleLilian NyamburaMainaNdee03/11/2023 17:24KCS362A############02/12/202329.28Active
341C28463001Type C - Private CarLilian NyamburaMainaNdee03/11/2023 17:29KCN449W############02/12/202329.27Active
usedata




to look like this, i checked i havent got GROUPBY or PIVOTBY yet on rollout


mrexcelquestion.xlsx
ABCDEF
3agencytype of coverno of days
41 to 3031to183183to335335to365
5Azadon Insurance AgencyType B - Commercial Vehicle
6Type C - Private Car
7Type D - Motor Cycle
8Type D - PSV
9GRALEY INSURANCE AGENCYType B - Commercial Vehicle
10Type C - Private Car
11Type D - Motor Cycle
12Type D - PSV
13Jawwab Insurance AgenciesType B - Commercial Vehicle
14Type C - Private Car
15Lilian NyamburaType B - Commercial Vehicle
16Type C - Private Car
17Type D - Motor Cycle
18Type D - PSV
19MERKEL BLUE INSURANCE AGENCYType B - Commercial Vehicle
20Type C - Private Car
21Type D - PSV
22Nelkan Insurance AgencyType B - Commercial Vehicle
23Type C - Private Car
24Type D - Motor Cycle
25Type D - PSV
26NOVASURE INSURANCE AGENCYType B - Commercial Vehicle
27Type C - Private Car
28Type D - Motor Cycle
29Type D - PSV
30Opalescent Insurance AgencyType B - Commercial Vehicle
31Type C - Private Car
32Type D - Motor Cycle
33Type D - PSV
34PANTHERA INSURANCE AGENCYType B - Commercial Vehicle
35Type C - Private Car
36Type D - PSV
37REMEMBER INSURANCE AGENCYType B - Commercial Vehicle
38Type C - Private Car
39Type D - Motor Cycle
40Type D - PSV
41Royal Mat Insurance AgencyType B - Commercial Vehicle
42Type C - Private Car
43Type D - Motor Cycle
44Type D - PSV
45TRUWYSE INSURANCE AGENCYType B - Commercial Vehicle
46Type C - Private Car
47Type D - Motor Cycle
48Type D - PSV
49Urbanlink Insurance AgencyType B - Commercial Vehicle
50Type C - Private Car
51Type D - Motor Cycle
52Type D - PSV
Sheet4
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Maybe:

Book1
ABCDEF
1agencytype of coverno of days
21 to 3031 to 183184 to 335 336 to 365
3Lilian NyamburaType B - Commercial Vehicle0000
4Type C - Private Car0000
5Nelkan Insurance AgencyType B - Commercial Vehicle280.4451000
6Opalescent Insurance AgencyType D - Motor Cycle0700.400700
7Type D - PSV0365.365300
8PANTHERA INSURANCE AGENCYType C - Private Car033500
9
Sheet4
Cell Formulas
RangeFormula
A3:B8A3=LET(d,CHOOSE({1,2},usedata!C:C,usedata!B:B),f,UNIQUE(FILTER(d,(usedata!C:C<>"")*(usedata!C:C<>"agency"))),SORT(f,{1,2},{1,1}))
C3:F8C3=SUMIFS(usedata!I:I,usedata!C:C,INDEX(A3#,0,1),usedata!B:B,INDEX(A3#,0,2),usedata!H:H,">"&TODAY()+{0,30,183,335},usedata!H:H,"<="&TODAY()+{30,183,335,365})
Dynamic array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:A28Expression=A2=A1textNO


Note that in column A, the agency names are actually in the blank cells, I just used Conditional Formatting to show them as blank. Also, the totals in the C:F columns are a bit of a guess. I assumed you wanted the totals matching the A:B columns, and distributed to the C:F columns based on how far out the date is in column H of the table. Let me know if this is close to what you want.
 
Upvote 0
I want no of counts in the cells, those appear to be no of days !!
 
Upvote 0
The numbers in the cells are the sum of the amounts. If you just want the counts:

Book1
ABCDEF
1agencytype of coverno of days
21 to 3031 to 183184 to 335 336 to 365
3Lilian NyamburaType B - Commercial Vehicle0000
4Type C - Private Car0000
5Nelkan Insurance AgencyType B - Commercial Vehicle1000
6Opalescent Insurance AgencyType D - Motor Cycle0200
7Type D - PSV0100
8PANTHERA INSURANCE AGENCYType C - Private Car0100
Sheet4
Cell Formulas
RangeFormula
A3:B8A3=LET(d,CHOOSE({1,2},usedata!C:C,usedata!B:B),f,UNIQUE(FILTER(d,(usedata!C:C<>"")*(usedata!C:C<>"agency"))),SORT(f,{1,2},{1,1}))
C3:F8C3=COUNTIFS(usedata!C:C,INDEX(A3#,0,1),usedata!B:B,INDEX(A3#,0,2),usedata!H:H,">"&TODAY()+{0,30,183,335},usedata!H:H,"<="&TODAY()+{30,183,335,365})
Dynamic array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:A28Expression=A2=A1textNO
 
Upvote 0
Not from today , i checked it out now, there are riots in country as we speak.
i want it sans TODAY() , only focus on no. of days .
Its not an ageing list !! column I data should be static.
I removed TODAY() and i got zeroes
 
Upvote 0
Do you mean the number of days between the G and H columns? Try:

Book1
ABCDEF
1agencytype of coverno of days
21 to 3031 to 183184 to 335 336 to 365
3Lilian NyamburaType B - Commercial Vehicle1000
4Type C - Private Car1100
5Nelkan Insurance AgencyType B - Commercial Vehicle0010
6Opalescent Insurance AgencyType D - Motor Cycle1011
7Type D - PSV0001
8PANTHERA INSURANCE AGENCYType C - Private Car1010
Sheet4
Cell Formulas
RangeFormula
A3:B8A3=LET(d,CHOOSE({1,2},usedata!C:C,usedata!B:B),f,UNIQUE(FILTER(d,(usedata!C:C<>"")*(usedata!C:C<>"agency"))),SORT(f,{1,2},{1,1}))
C3:F8C3=SUM((usedata!$C$2:$C$20=$A3)*(usedata!$B$2:$B$20=$B3)*(MATCH(usedata!$H$2:$H$20-usedata!$G$2:$G$20,{0,31,184,336,366})=COLUMNS($C3:C3)))
Dynamic array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:A28Expression=A2=A1textNO


I wasn't able to come up with a SPILL formula for this. I also am lacking some of the newer functions that might allow that.
 
Upvote 0
thanks,
i made a slight modification to your formula to accommodate my real worksheet (at workplace)
=SUM((usedata!$C$2:$C$26339=$A3)*(usedata!$B$2:$B$26339=$B3)*(MATCH(usedata!$H$2:$H$26339-usedata!$G$2:$G$26339,{0,31,184,336,366})=COLUMNS($C3:C3)))
but the LET function i let it stay as it is, i will validate it tomorrow !! i hope am not going wrong, the one with TODAY() function will come in helpful.
 
Upvote 0
i have a small challenge here, i analysed it and the count was less than 26339 rows. if it can be circumvented. what i dont get is how the count was shown inspite of rule <> "agency"

i suppose it could be this formula here =LET(d,CHOOSE({1,2},usedata!C:C,usedata!B:B),f,UNIQUE(FILTER(d,(usedata!C:C<>"")*(usedata!C:C<>"agency"))),SORT(f,{1,2},{1,1}))

mrexcelquestion.xlsx
ABCDEF
11Jawwab Insurance AgenciesType B - Commercial Vehicle00200
12Jawwab Insurance AgenciesType C - Private Car011640
13Lilian NyamburaType B - Commercial Vehicle32071840
14Lilian NyamburaType C - Private Car45083180
Sheet1
 
Upvote 0
I don't understand what your challenge is?

I included the (usedata!C:C<>"agency") part of the formula so that I could use the whole column references. "agency" is the header in column C, so that section was just intended to exclude the header from the results. If you use the actual range of the data, like you did in post 7, you can eliminate that part, like this:

Excel Formula:
=LET(d,CHOOSE({1,2},usedata!C2:C26339,usedata!B2:B26339),f,UNIQUE(FILTER(d,usedata!C2:C26339<>"")),SORT(f,{1,2},{1,1}))

In fact, if you use the actual range, and there are no blank rows in the range, you can eliminate the whole FILTER function (and it's now simple enough to not need LET):

Excel Formula:
=SORT(UNIQUE(CHOOSE({1,2},usedata!C2:C26339,usedata!B2:B26339)),{1,2},{1,1})
 
Upvote 0
Solution
The challenge was only I couldn't discern how to get the rest which didn't have agency written. Anyway I shall try those out.
Thank you for your assistance, am much obliged.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,221,673
Messages
6,161,209
Members
451,690
Latest member
mausdrofnas

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