Help please

GH19NEL

New Member
Joined
Sep 8, 2022
Messages
11
Office Version
  1. 365
Platform
  1. Windows
Hello All,

I'm a newbie here so please don't be too harsh with me:) I apologise if this has been covered somewhere before, but I can't find any information on what I'm looking to achieve.

Here goes,

I'll have a Master sheet that I will populate with ID numbers, names, dates and number of days etc, so it will be updated with new data frequently. The problem being there will be duplicate ID numbers and names appearing all the time.

Ideally, what I would like it to do is auto populate a separate sheet with it pulling the ID number and name through (only once, so I'd like it to automatically remove duplicates in the process), whilst adding up the number of days associated with these multiple lines of ID numbers.
Hopefully I make sense 🥴 I thought I was good at excel but I can't put my finger on the best way to approach it and actually feel a bit silly asking this question which is probably a walk in the park for most of you.

Thank you for taking the time to read this.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Hi & welcome to MrExcel.

Can you post some sample data, along with expected results.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Hi Fluff

Thank you for taking the time to read my help request and rapid response. Unfortunately, due to using Excel at work, I'm not able to add - add ons. so the best I can do is attach the below a screenshots.

Sheet 1 will be the master.

1662652681165.png


The below will be sheet 2 and a summary (I guess), dropping the duplicates whilst adding up the no. of days from the multiple entries.

1662652817822.png


The only thing being, Sheet 1 will be constantly updated and will have duplicates appearing frequently but when sheet 1 is populated, I would like sheet 2 to update automatically based on the above.

I'm hoping this makes sense.
Thank you.
 
Upvote 0
As you cannot use the add-in, can you just copy paste the data from sheet1. Thanks
 
Upvote 0
As you cannot use the add-in, can you just copy paste the data from sheet1. Thanks

Thank you Fluff, for your replies. I've copied & pasted the data from sheet 1 below. I was in 2 minds whether the best way to attempt it was a formula or a VBA with a macro. Intrigued to know which way you would approach it to get the required outcome.


ID No.ForenameSurnameHomeWhereFromToNo. of days
147586​
MickeyMouseDisneyworldClubhouse
01/06/2022​
05/06/2022​
3​
210298​
DonaldDuckDisneyworldClubhouse
05/07/2022​
08/07/2022​
2​
124896​
ClarkKentSmallvilleKent Farm
15/06/2022​
19/06/2022​
5​
187569​
IndianaJonesColoradoAntonito
12/05/2022​
17/05/2022​
6​
126786​
SherlockHolmesLondonBaker Street
08/07/2022​
12/07/2022​
4​
147586​
MickeyMouseDisneyworldClubhouse
20/06/2022​
21/06/2022​
2​
199878​
IronManCaliforniaMalibu Point
03/09/2022​
07/09/2022​
5​
165897​
HarryPotterBerkshirePicket Post Close
15/03/2022​
16/03/2022​
2​
126786​
SherlockHolmesLondonBaker Street
30/07/2022​
02/07/2022​
3​
147586​
MickeyMouseDisneyworldClubhouse
01/08/2022​
03/08/2022​
3​

Regards
 
Upvote 0
Thanks for that.
Two options depending on if you have hstack yet.
Fluff.xlsm
ABCDEFGHIJKLMNO
1ID No.ForenameSurnameHomeWhereFromToNo. of days
2147586MickeyMouseDisneyworldClubhouse01/06/202205/06/20223147586MickeyMouseDisneyworldClubhouse8
3210298DonaldDuckDisneyworldClubhouse05/07/202208/07/20222210298DonaldDuckDisneyworldClubhouse2
4124896ClarkKentSmallvilleKent Farm15/06/202219/06/20225124896ClarkKentSmallvilleKent Farm5
5187569IndianaJonesColoradoAntonito12/05/202217/05/20226187569IndianaJonesColoradoAntonito6
6126786SherlockHolmesLondonBaker Street08/07/202212/07/20224126786SherlockHolmesLondonBaker Street7
7147586MickeyMouseDisneyworldClubhouse20/06/202221/06/20222199878IronManCaliforniaMalibu Point5
8199878IronManCaliforniaMalibu Point03/09/202207/09/20225165897HarryPotterBerkshirePicket Post Close2
9165897HarryPotterBerkshirePicket Post Close15/03/202216/03/20222
10126786SherlockHolmesLondonBaker Street30/07/202202/07/20223
11147586MickeyMouseDisneyworldClubhouse01/08/202203/08/20223147586MickeyMouseDisneyworldClubhouse8
12210298DonaldDuckDisneyworldClubhouse2
13124896ClarkKentSmallvilleKent Farm5
14187569IndianaJonesColoradoAntonito6
15126786SherlockHolmesLondonBaker Street7
16199878IronManCaliforniaMalibu Point5
17165897HarryPotterBerkshirePicket Post Close2
18
19
Sheet1
Cell Formulas
RangeFormula
J2:O8J2=LET(u,UNIQUE(FILTER(A2:E1000,A2:A1000<>"")),HSTACK(u,SUMIFS(H:H,A:A,INDEX(u,,1))))
J11:O17J11=LET(u,UNIQUE(FILTER(A2:E1000,A2:A1000<>"")),s,SEQUENCE(,COLUMNS(u)+1),IF(s<=COLUMNS(u),u,SUMIFS(H:H,A:A,INDEX(u,,1))))
Dynamic array formulas.
 
Upvote 0
Possible other solution using a Pivot table
Book2
ABCDEFGHIJKLMNO
1ID No.ForenameSurnameHomeWhereFromToNo. of days
2147586MickeyMouseDisneyworldClubhouse01/06/202205/06/20223Sum of No. of days
3210298DonaldDuckDisneyworldClubhouse05/07/202208/07/20222ID No.ForenameSurnameHomeWhereTotal
4124896ClarkKentSmallvilleKent Farm15/06/202219/06/20225124896ClarkKentSmallvilleKent Farm5
5187569IndianaJonesColoradoAntonito12/05/202217/05/20226126786SherlockHolmesLondonBaker Street7
6126786SherlockHolmesLondonBaker Street08/07/202212/07/20224147586MickeyMouseDisneyworldClubhouse8
7147586MickeyMouseDisneyworldClubhouse20/06/202221/06/20222165897HarryPotterBerkshirePicket Post Close2
8199878IronManCaliforniaMalibu Point03/09/202207/09/20225187569IndianaJonesColoradoAntonito6
9165897HarryPotterBerkshirePicket Post Close15/03/202216/03/20222199878IronManCaliforniaMalibu Point5
10126786SherlockHolmesLondonBaker Street30/07/202202/07/20223210298DonaldDuckDisneyworldClubhouse2
11147586MickeyMouseDisneyworldClubhouse01/08/202203/08/20223
Sheet1
 
Upvote 0
Thank you so much Fluff & Kerryx. I appreciate your time. I will have a look at these solutions later today as currently away from my desk.
 
Upvote 0

Hi Fluff, me again 🥴

I've added your formula to my spreadsheet and copied and pasted the results below from both example formulas you provided. Thank you for the time you've taken to help. I am grateful, although I do have 1 more question (as probably most people always do haha). It ALMOST works as I would like but when I add a new line of data (I've added Mickey Mouse again) it does add the totals up in the results but doesn't recognise there is already that ID number/name so add them as a new line, it does however recognise that it needs to add the total days to both lines of data.

Is there anyway of it recognising that this name/ID number already appear in the results/summary?

ID No.ForenameSurnameHomeWhereNo. of days
147586​
MickeyMouseDisneyworldClubhouse
10​
147586​
MickeyMouseDisneyworldClubhouse
8​
210298​
DonaldDuckDisneyworldClubhouse
2​
210298​
DonaldDuckDisneyworldClubhouse
2​
124896​
ClarkKentSmallvilleKent Farm
5​
124896​
ClarkKentSmallvilleKent Farm
5​
187569​
IndianaJonesColoradoAntonito
6​
187569​
IndianaJonesColoradoAntonito
6​
126786​
SherlockHolmesLondonBaker Street
7​
126786​
SherlockHolmesLondonBaker Street
7​
199878​
IronManCaliforniaMalibu Point
5​
199878​
IronManCaliforniaMalibu Point
5​
165897​
HarryPotterBerkshirePicket Post Close
2​
165897​
HarryPotterBerkshirePicket Post Close
2​
147586
MickeyMouseDisneyworldClubhouse
10
147586​
MickeyMouseDisneyworldClubhouse
2​
147586​
MickeyMouseDisneyworldClubhouse
10​
210298​
DonaldDuckDisneyworldClubhouse
2​
124896​
ClarkKentSmallvilleKent Farm
5​
187569​
IndianaJonesColoradoAntonito
6​
126786​
SherlockHolmesLondonBaker Street
7​
199878​
IronManCaliforniaMalibu Point
5​
165897​
HarryPotterBerkshirePicket Post Close
2​
147586
MickeyMouseDisneyworldClubhouse
10

Kind Regards
 
Upvote 0

Forum statistics

Threads
1,214,805
Messages
6,121,664
Members
449,045
Latest member
Marcus05

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