Thank you for responding and helping me I'm very grateful!
[TABLE="width: 588"]
<colgroup><col width="61" style="width: 46pt; mso-width-source: userset; mso-width-alt: 2230;"> <col width="203" style="width: 152pt; mso-width-source: userset; mso-width-alt: 7424;"> <col width="161" style="width: 121pt; mso-width-source: userset; mso-width-alt: 5888;"> <col width="136" style="width: 102pt; mso-width-source: userset; mso-width-alt: 4973;"> <col width="222" style="width: 167pt; mso-width-source: userset; mso-width-alt: 8118;"> [TR]
[TD="width: 264, bgcolor: transparent, colspan: 2"]
This is my raw data[/TD]
[TD="width: 161, bgcolor: transparent"][/TD]
[TD="width: 136, bgcolor: transparent"][/TD]
[TD="width: 222, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: yellow"]
External ID[/TD]
[TD="bgcolor: yellow"]
Name[/TD]
[TD="bgcolor: yellow"]
Amounts£[/TD]
[TD="bgcolor: yellow"]
Date1[/TD]
[TD="bgcolor: yellow"]
Date2[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]
CODE1[/TD]
[TD="bgcolor: transparent"]
ENTITY ONE[/TD]
[TD="bgcolor: transparent"]
26.96[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]
06/09/2022[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]
CODE1[/TD]
[TD="bgcolor: transparent"]
ENTITY ONE[/TD]
[TD="bgcolor: transparent"]
18.47[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]
23/06/2019[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]
CODE1[/TD]
[TD="bgcolor: transparent"]
ENTITY ONE[/TD]
[TD="bgcolor: transparent"]
63.56[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]
22/07/2024[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]
CODE1[/TD]
[TD="bgcolor: transparent"]
ENTITY ONE[/TD]
[TD="bgcolor: transparent"]
12.90[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]
22/10/2022[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]
CODE1[/TD]
[TD="bgcolor: transparent"]
ENTITY ONE[/TD]
[TD="bgcolor: transparent"]
58.01[/TD]
[TD="bgcolor: transparent"]
18/08/2020[/TD]
[TD="bgcolor: transparent"]
17/08/2025[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]
CODE2[/TD]
[TD="bgcolor: transparent"]
ENTITY TWO[/TD]
[TD="bgcolor: transparent"]
11.00[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]
24/03/2019[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]
CODE3[/TD]
[TD="bgcolor: transparent"]
ENTITY THREE[/TD]
[TD="bgcolor: transparent"]
17.51[/TD]
[TD="bgcolor: transparent"]
24/06/2035[/TD]
[TD="bgcolor: transparent"]
23/06/2037[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]
CODE4[/TD]
[TD="bgcolor: transparent"]
ENTITY FOUR[/TD]
[TD="bgcolor: transparent"]
19.99[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]
02/12/2022[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]
CODE4[/TD]
[TD="bgcolor: transparent"]
ENTITY FOUR[/TD]
[TD="bgcolor: transparent"]
20.01[/TD]
[TD="bgcolor: transparent"]
18/07/2022[/TD]
[TD="bgcolor: transparent"]
17/07/2027[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]
CODE4[/TD]
[TD="bgcolor: transparent"]
ENTITY FOUR[/TD]
[TD="bgcolor: transparent"]
19.99[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]
05/09/2020[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]
CODE4[/TD]
[TD="bgcolor: transparent"]
ENTITY FOUR[/TD]
[TD="bgcolor: transparent"]
20.72[/TD]
[TD="bgcolor: transparent"]
12/05/2022[/TD]
[TD="bgcolor: transparent"]
11/05/2027[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]
CODE4[/TD]
[TD="bgcolor: transparent"]
ENTITY FOUR[/TD]
[TD="bgcolor: transparent"]
15.51[/TD]
[TD="bgcolor: transparent"]
12/10/2025[/TD]
[TD="bgcolor: transparent"]
11/10/2030[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]
CODE4[/TD]
[TD="bgcolor: transparent"]
ENTITY FOUR[/TD]
[TD="bgcolor: transparent"]
29.98[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]
31/01/2033[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]
CODE5[/TD]
[TD="bgcolor: transparent"]
ENTITY FIVE[/TD]
[TD="bgcolor: transparent"]
38.07[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]
18/06/2023[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]
CODE5[/TD]
[TD="bgcolor: transparent"]
ENTITY FIVE[/TD]
[TD="bgcolor: transparent"]
160.00[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]
23/10/2021[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]
CODE5[/TD]
[TD="bgcolor: transparent"]
ENTITY FIVE[/TD]
[TD="bgcolor: transparent"]
62.33[/TD]
[TD="bgcolor: transparent"]
23/04/2021[/TD]
[TD="bgcolor: transparent"]
22/04/2024[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]
CODE5[/TD]
[TD="bgcolor: transparent"]
ENTITY FIVE[/TD]
[TD="bgcolor: transparent"]
50.00[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]
22/04/2025[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]
CODE5[/TD]
[TD="bgcolor: transparent"]
ENTITY FIVE[/TD]
[TD="bgcolor: transparent"]
50.01[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]
10/05/2019[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]
CODE5[/TD]
[TD="bgcolor: transparent"]
ENTITY FIVE[/TD]
[TD="bgcolor: transparent"]
0.00[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]
23/06/2080[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]
CODE5[/TD]
[TD="bgcolor: transparent"]
ENTITY FIVE[/TD]
[TD="bgcolor: transparent"]
0.00[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]
24/06/2080[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]
CODE5[/TD]
[TD="bgcolor: transparent"]
ENTITY FIVE[/TD]
[TD="bgcolor: transparent"]
0.00[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]
23/06/2080[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR][/TABLE]
This is my current output:
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: yellow"]
External ID
[/TD]
[TD="bgcolor: yellow"]
Name
[/TD]
[TD="bgcolor: yellow"]
Amounts£
[/TD]
[TD="bgcolor: yellow"]
Date1
[/TD]
[TD="bgcolor: yellow"]
Date2
[/TD]
[TD="bgcolor: transparent"]
CODE1
[/TD]
[TD="bgcolor: transparent"]
ENTITY ONE
[/TD]
[TD="width: 161, bgcolor: transparent"]
£12.90 - £63.56
[/TD]
[TD="width: 136, bgcolor: transparent"]
- Aug-20
[/TD]
[TD="width: 222, bgcolor: transparent"]
Jun-19 - Aug-25
[/TD]
[TD="bgcolor: transparent"]
CODE2
[/TD]
[TD="bgcolor: transparent"]
ENTITY TWO
[/TD]
[TD="width: 161, bgcolor: transparent"]
£11.00
[/TD]
[TD="width: 136, bgcolor: transparent"]
[/TD]
[TD="width: 222, bgcolor: transparent"]
Mar-19
[/TD]
[TD="bgcolor: transparent"]
CODE3
[/TD]
[TD="bgcolor: transparent"]
ENTITY THREE
[/TD]
[TD="width: 161, bgcolor: transparent"]
£17.51
[/TD]
[TD="width: 136, bgcolor: transparent"]
Jun-35
[/TD]
[TD="width: 222, bgcolor: transparent"]
Jun-37
[/TD]
[TD="bgcolor: transparent"]
CODE4
[/TD]
[TD="bgcolor: transparent"]
ENTITY FOUR
[/TD]
[TD="width: 161, bgcolor: transparent"]
£15.51 - £29.98
[/TD]
[TD="width: 136, bgcolor: transparent"]
- Oct-25
[/TD]
[TD="width: 222, bgcolor: transparent"]
Sep-20 - Jan-33
[/TD]
[TD="bgcolor: transparent"]
CODE5
[/TD]
[TD="bgcolor: transparent"]
ENTITY FIVE
[/TD]
[TD="width: 161, bgcolor: transparent"]
£0.00 - £160.00
[/TD]
[TD="width: 136, bgcolor: transparent"]
- Apr-21
[/TD]
[TD="width: 222, bgcolor: transparent"]
May-19 - Jun-80
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
This is what I would like:
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: yellow"]
External ID
[/TD]
[TD="bgcolor: yellow"]
Name
[/TD]
[TD="bgcolor: yellow"]
Amounts£
[/TD]
[TD="bgcolor: yellow"]
Date1
[/TD]
[TD="bgcolor: yellow"]
Date2
[/TD]
[TD="bgcolor: transparent"]
CODE1
[/TD]
[TD="bgcolor: transparent"]
ENTITY ONE
[/TD]
[TD="width: 161, bgcolor: transparent"]
£12.90 - £63.56
[/TD]
[TD="width: 136, bgcolor: transparent"]
Aug-20
[/TD]
[TD="width: 222, bgcolor: transparent"]
Jun-19 - Aug-25
[/TD]
[TD="bgcolor: transparent"]
CODE2
[/TD]
[TD="bgcolor: transparent"]
ENTITY TWO
[/TD]
[TD="width: 161, bgcolor: transparent"]
£11.00
[/TD]
[TD="width: 136, bgcolor: transparent"]
[/TD]
[TD="width: 222, bgcolor: transparent"]
Mar-19
[/TD]
[TD="bgcolor: transparent"]
CODE3
[/TD]
[TD="bgcolor: transparent"]
ENTITY THREE
[/TD]
[TD="width: 161, bgcolor: transparent"]
£17.51
[/TD]
[TD="width: 136, bgcolor: transparent"]
Jun-35
[/TD]
[TD="width: 222, bgcolor: transparent"]
Jun-37
[/TD]
[TD="bgcolor: transparent"]
CODE4
[/TD]
[TD="bgcolor: transparent"]
ENTITY FOUR
[/TD]
[TD="width: 161, bgcolor: transparent"]
£15.51 - £29.98
[/TD]
[TD="width: 136, bgcolor: transparent"]
Oct-25
[/TD]
[TD="width: 222, bgcolor: transparent"]
Sep-20 - Jan-33
[/TD]
[TD="bgcolor: transparent"]
CODE5
[/TD]
[TD="bgcolor: transparent"]
ENTITY FIVE
[/TD]
[TD="width: 161, bgcolor: transparent"]
£38.07 - £160.00
[/TD]
[TD="width: 136, bgcolor: transparent"]
Apr-21
[/TD]
[TD="width: 222, bgcolor: transparent"]
May-19 - Jun-80
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="width: 161, bgcolor: transparent"]
* I'd like the number to ignore zero and take the next smallest number
[/TD]
[TD="width: 136, bgcolor: transparent"]
* If there is only one date in a range I would like it to ignore the blanks
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
This is my code:
Code:
Sheets("Output").Select
Range("A5").Select
If MAXVALUE = MINVALUE Then
RENTVALUE = Format$(MINVALUE, "£#,##0.00")
Else
RENTVALUE = Format$(MINVALUE, "£#,##0.00") & " - " & Format$(MAXVALUE, "£#,##0.00")
End If
ActiveCell.Offset(I, 3) = RENTVALUE
If MAXDATE = MINDATE Then
NEXTREVIEW = Format(MINDATE, "mmm-yy")
Else
NEXTREVIEW = Format(MINDATE, "mmm-yy") & " - " & Format(MAXDATE, "mmm-yy")
End If
ActiveCell.Offset(I, 4) = NEXTREVIEW
If MAXBDATE = MINBDATE Then
BREAKDATE = Format(MINBDATE, "mmm-yy")
Else
BREAKDATE = Format(MINBDATE, "mmm-yy") & " - " & Format(MAXBDATE, "mmm-yy")
End If
ActiveCell.Offset(I, 5) = BREAKDATE