Finding and Computing

TexEth

New Member
Joined
Jan 24, 2023
Messages
22
Office Version
  1. 365
Platform
  1. Windows
Data structure:

Rows: years
Columns: Countries
Cells: contain value for each country observed in each year

Tasks:
1). Find the minimum value for each country and place it in the first empty row at the bottom of the data.

2). Calculate the difference between the minimum value and the first year's value (e.g. A2). Place the finding in the next empty bottom row.
(Note: calculate the difference in % form.)

3). Count number of years (i.e. rows) that have elapsed between the initial year value (A2) and the minimum value. Place the finding in the third empty row at the bottom.

4). Among all values which have occurred after the minimum value, which one is the first value equal or greater to the initial value (A2)? Place the value in the fourth empty row at the bottom.

5). Count the number of years (i.e., rows) between the minimum value and the value you have found in step 4. Place the count in the fifth empty row at the bottom.


Do the five tasks for all countries (i.e., as many columns as there are with data.)
 

Attachments

  • Capture-2.PNG
    Capture-2.PNG
    24.7 KB · Views: 5

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
My counts are a bit different.

MrExcelPlayground15.xlsx
ABCD
1YearAlbaniaAlgeriaArmenia
220004007001000
320014257101020
420024507201040
520034757301060
620045007401080
720055257501100
820065507601120
920075754251140
1020083004601160
1120093504951180
1220104005301200
1320114505651220
1420125006001240
1520135506351260
162014600670800
172015650705875
182016700740950
1920177507751025
2020188008101100
2120198508451175
2220209008801250
23
24Min300425800
25Drop Intensity25%39%20%
26Drop Time9815
27Recovery Amount4007051025
28Recovery Time283
Sheet18
Cell Formulas
RangeFormula
A3:A22A3=A2+1
B24:D24B24=MIN(B2:B22)
B25:D25B25=(B2-B24)/B2
B26:D26B26=MATCH(B24,B2:B22,0)
B27:D27B27=INDEX(B2:B22,MATCH(1,(--(IF(SEQUENCE(ROWS(B2:B22))<B26,0,B2:B22)>=B2)),0))
B28:D28B28=MATCH(1,(--(IF(SEQUENCE(ROWS(B2:B22))<B26,0,B2:B22)>=B2)),0)-B26
 
Upvote 0
My counts are a bit different.

MrExcelPlayground15.xlsx
ABCD
1YearAlbaniaAlgeriaArmenia
220004007001000
320014257101020
420024507201040
520034757301060
620045007401080
720055257501100
820065507601120
920075754251140
1020083004601160
1120093504951180
1220104005301200
1320114505651220
1420125006001240
1520135506351260
162014600670800
172015650705875
182016700740950
1920177507751025
2020188008101100
2120198508451175
2220209008801250
23
24Min300425800
25Drop Intensity25%39%20%
26Drop Time9815
27Recovery Amount4007051025
28Recovery Time283
Sheet18
Cell Formulas
RangeFormula
A3:A22A3=A2+1
B24:D24B24=MIN(B2:B22)
B25:D25B25=(B2-B24)/B2
B26:D26B26=MATCH(B24,B2:B22,0)
B27:D27B27=INDEX(B2:B22,MATCH(1,(--(IF(SEQUENCE(ROWS(B2:B22))<B26,0,B2:B22)>=B2)),0))
B28:D28B28=MATCH(1,(--(IF(SEQUENCE(ROWS(B2:B22))<B26,0,B2:B22)>=B2)),0)-B26
It worked perfectly. You saved me hours of manual labor! Thank you!
 
Upvote 0

Forum statistics

Threads
1,214,884
Messages
6,122,082
Members
449,064
Latest member
MattDRT

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