Formula which will populate a second cell if the first intended cell is already populated?

Noswen869

New Member
Joined
Jul 18, 2023
Messages
14
Office Version
  1. 2021
Platform
  1. Windows
I am currently having to manually enter the dates that an employee has a meeting onto a central spreadsheet. I am looking for a way in which excel can do this for me automatically, probably via a vlookup of some kind.

I can download a spreadsheet of the data which will include the employee number (which the main sheet also uses) alongside the date of the meeting. This works fine when an employee has just the one meeting on the downloaded data sheet as a simple vlookup will automatically populate the 'Meeting 1' cell on the main sheet.

However my issue is when an employee has two or three meetings on the downloaded data sheet. I therefore need excel to populate the earliest date into 'Meeting 1' column on the main spreadsheet, the next date into 'Meeting 2' column on the main spreadsheet and so on etc.

Apologies if this does not format properly as this is the first time I'm attempting to use XLS2BB - here is a basic mock version of what the downloaded data sheet will look like:
Book1
AB
1Emp. NumberMeeting Date
21231/1/22
32345/10/22
43459/20/22
51235/15/23
623412/8/23
73454/29/23
Sheet2

Here is a mock version of what the main central spreadsheet will look like - this is where I would like the meeting dates to show:
Book1
ABCD
1Emp. NumberMeeting Date 1Meeting Date 2Meeting Date 3
2123
3234
4345
Sheet1
 
In that case you will need to use a modified version of Peter's formula like
Fluff.xlsm
ABCDEFGHI
1Emp. NumberMeeting Date 1Seen/DNAMeeting Date 2Seen/DNAMeeting Date 3Seen/DNAMeeting Date 4Seen/DNA
2101/01/202306/01/202311/01/202316/01/2023
3202/01/202307/01/202312/01/202317/01/2023
4303/01/202308/01/202313/01/202318/01/2023
5404/01/202309/01/202314/01/202319/01/2023
6505/01/202310/01/202315/01/202320/01/2023
Sheet2
Cell Formulas
RangeFormula
B2:B6B2=IFERROR(AGGREGATE(15,6,Sheet1!$B$2:$B$100/(Sheet1!$A$2:$A$100=$A2),1),"")
D2:D6D2=IFERROR(AGGREGATE(15,6,Sheet1!$B$2:$B$100/(Sheet1!$A$2:$A$100=$A2),2),"")
F2:F6F2=IFERROR(AGGREGATE(15,6,Sheet1!$B$2:$B$100/(Sheet1!$A$2:$A$100=$A2),3),"")
H2:H6H2=IFERROR(AGGREGATE(15,6,Sheet1!$B$2:$B$100/(Sheet1!$A$2:$A$100=$A2),4),"")
 
Upvote 0
Solution

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
In that case you will need to use a modified version of Peter's formula like
Fluff.xlsm
ABCDEFGHI
1Emp. NumberMeeting Date 1Seen/DNAMeeting Date 2Seen/DNAMeeting Date 3Seen/DNAMeeting Date 4Seen/DNA
2101/01/202306/01/202311/01/202316/01/2023
3202/01/202307/01/202312/01/202317/01/2023
4303/01/202308/01/202313/01/202318/01/2023
5404/01/202309/01/202314/01/202319/01/2023
6505/01/202310/01/202315/01/202320/01/2023
Sheet2
Cell Formulas
RangeFormula
B2:B6B2=IFERROR(AGGREGATE(15,6,Sheet1!$B$2:$B$100/(Sheet1!$A$2:$A$100=$A2),1),"")
D2:D6D2=IFERROR(AGGREGATE(15,6,Sheet1!$B$2:$B$100/(Sheet1!$A$2:$A$100=$A2),2),"")
F2:F6F2=IFERROR(AGGREGATE(15,6,Sheet1!$B$2:$B$100/(Sheet1!$A$2:$A$100=$A2),3),"")
H2:H6H2=IFERROR(AGGREGATE(15,6,Sheet1!$B$2:$B$100/(Sheet1!$A$2:$A$100=$A2),4),"")
Thanks so much. Really appreciate your help with this:

As before, would you be able to break down this formula to explain it for me? I'm particularly unsure as to the relevance of '15,6'. Thank you!
 
Upvote 0
Have a look here for info on the aggregate function AGGREGATE Function
Cheers - that helps. I'll try to find some more examples to practice using this function.

Currently now attempting to work out how I would now pull across the 'SEEN/DNA' info onto the main tab next to the corresponding dates. Any help would be much appreciated

Data sheet here:
Book1
ABC
1Emp. NumberMeeting DateSEEN/DNA
21Sunday, 1 January 2023Seen
32Monday, 2 January 2023DNA
43Tuesday, 3 January 2023Seen
54Wednesday, 4 January 2023DNA
65Thursday, 5 January 2023DNA
71Friday, 6 January 2023Seen
82Saturday, 7 January 2023DNA
93Sunday, 8 January 2023DNA
104Monday, 9 January 2023DNA
115Tuesday, 10 January 2023Seen
121Wednesday, 11 January 2023DNA
132Thursday, 12 January 2023DNA
143Friday, 13 January 2023Seen
154Saturday, 14 January 2023DNA
165Sunday, 15 January 2023DNA
171Monday, 16 January 2023Seen
182Tuesday, 17 January 2023DNA
193Wednesday, 18 January 2023DNA
204Thursday, 19 January 2023Seen
215Friday, 20 January 2023DNA
221Saturday, 21 January 2023DNA
232Sunday, 22 January 2023DNA
243Monday, 23 January 2023Seen
254Tuesday, 24 January 2023DNA
265Wednesday, 25 January 2023DNA
WEM Dates


Main tab here:
Book1
ABCDEFGHIJ
1Emp. NumberMeeting Date 1Seen/DNAMeeting Date 2Seen/DNAMeeting Date 3Seen/DNAMeeting Date 4Seen/DNAMeeting Date 5
211/1/23 1/6/231/11/231/16/231/21/23
321/2/231/7/231/12/231/17/231/22/23
431/3/231/8/231/13/231/18/231/23/23
541/4/231/9/231/14/231/19/231/24/23
651/5/231/10/231/15/231/20/231/25/23
Admin Tab
Cell Formulas
RangeFormula
C2C2=IFERROR(AGGREGATE(14,6,'WEM Dates'!$C$2:$C$100/('WEM Dates'!$A$2:$A$100=$A2),1),"")
B2:B6B2=IFERROR(AGGREGATE(15,6,'WEM Dates'!$B$2:$B$100/('WEM Dates'!$A$2:$A$100=$A2),1),"")
D2:D6D2=IFERROR(AGGREGATE(15,6,'WEM Dates'!$B$2:$B$100/('WEM Dates'!$A$2:$A$100=$A2),2),"")
F2:F6F2=IFERROR(AGGREGATE(15,6,'WEM Dates'!$B$2:$B$100/('WEM Dates'!$A$2:$A$100=$A2),3),"")
H2:H6H2=IFERROR(AGGREGATE(15,6,'WEM Dates'!$B$2:$B$100/('WEM Dates'!$A$2:$A$100=$A2),4),"")
J2:J6J2=IFERROR(AGGREGATE(15,6,'WEM Dates'!$B$2:$B$100/('WEM Dates'!$A$2:$A$100=$A2),5),"")
 
Upvote 0
Why didn't you post that before? Rather than constantly moving the goalposts.
Is there anything else that you haven't mentioned?
 
Upvote 0
Why didn't you post that before? Rather than constantly moving the goalposts.
Is there anything else that you haven't mentioned?
This is a work in progress and initially wasn't needed. I appreciate your help so far so feel free to take a step back if this is an inconvenience. There is nothing else I need to mention, no.
 
Upvote 0
Ok how about
Fluff.xlsm
ABCDEFGHIJK
1Emp. NumberMeeting Date 1Seen/DNAMeeting Date 2Seen/DNAMeeting Date 3Seen/DNAMeeting Date 4Seen/DNAMeeting Date 5
2101/01/2023Seen06/01/2023Seen11/01/2023DNA16/01/2023Seen21/01/2023DNA
3202/01/2023DNA07/01/2023DNA12/01/2023DNA17/01/2023DNA22/01/2023DNA
4303/01/2023Seen08/01/2023DNA13/01/2023Seen18/01/2023DNA23/01/2023Seen
5404/01/2023DNA09/01/2023DNA14/01/2023DNA19/01/2023Seen24/01/2023DNA
6505/01/2023DNA10/01/2023Seen15/01/2023DNA20/01/2023DNA25/01/2023DNA
Sheet2
Cell Formulas
RangeFormula
B2:K6B2=LET(f,FILTER(Sheet1!$B$2:$C$100,Sheet1!$A$2:$A$100=A2),c,COLUMNS(f),s,SEQUENCE(,ROWS(f)*c,0),INDEX(f,INT(s/c)+1,MOD(s,c)+1))
Dynamic array formulas.
 
Upvote 0
Another option could be ..

Noswen869_1.xlsm
ABCDEFGHIJK
1Emp. NumberMeeting Date 1Seen/DNAMeeting Date 2Seen/DNAMeeting Date 3Seen/DNAMeeting Date 4Seen/DNAMeeting Date 5Seen/DNA
211/01/2023Seen6/01/2023Seen11/01/2023DNA16/01/2023Seen21/01/2023DNA
322/01/2023DNA7/01/2023DNA12/01/2023DNA17/01/2023DNA22/01/2023DNA
433/01/2023Seen8/01/2023DNA13/01/2023Seen18/01/2023DNA23/01/2023Seen
544/01/2023DNA9/01/2023DNA14/01/2023DNA19/01/2023Seen24/01/2023DNA
655/01/2023DNA10/01/2023Seen15/01/2023DNA20/01/2023DNA25/01/2023DNA
Admin Tab
Cell Formulas
RangeFormula
B2:K6B2=TRANSPOSE(FILTERXML("<p><c>"&TEXTJOIN("</c><c>",1,FILTER('WEM Dates'!B$2:C$26,'WEM Dates'!A$2:A$26=A2,""))&"</c></p>","//c"))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
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