Possibly simple solution

New Contributor
Hi All, this is probably a simple request but I can't get my head around this tonight!
I need to get 2 columns of data to duplicate in certain areas when assigned by a number. I've added a picture because I'm not sure if I'm explaining it right.
So in short I want the first name and last name to appear under the green '1' when I type in 1 in the table number column. Is this possible? There are multiple numbers to assign but if I can get the first one sorted i can go from there! Please help!
5 Replies
In F2 type
= IF( D2=$F$1, B2, "")

In G2 type
= IF( D2=$F$1, C2, "")

Then, drag the formulas down to the other rows.

If you want to have First and Last name in just one cell, type in F2:
= IF( D2=$F$1, B2 & " " & C2, "")

I hope I understood your requirement correctly.

@Celia_AlvesThankyou for this my only problem is now that it will only put in the first 10 names in the 1 section, how do I adjust the formula to make the names appear under other number sections when entering 6 next to the names or any other numbers? You can see the 6 section in the picture from before. I've tried to adjust the formulas but its not working. Does this make sense?


First of all, unmerge the columns F and G if they are merged and then try the following Array Formula (which requires confirmation with Ctrl+Shift+Enter instead of Enter alone) in F2 and copy it down as per your requirement.


In F2

=IFERROR(INDEX($B$2:$B$22&" "&$C$2:$C$22,SMALL(IF($D$2:$D$22=$F$1,ROW($B$2:$B$22)-ROW($B$2)+1),ROWS(F$2:F2))),"")

Confirm the above formula with Ctrl+Shift+Enter. When you confirm a formula as an Array Formula, you will notice in the formula bar that your formula gets surrounded by curly braces.


So as per the formula if you input 1 in F1, you will get all the names where column D has 1 and if you input 2, you will get all the names where column D has 2.


Adjust the range reference in the formula as per your requirement.


Note: Please consider uploading an Excel file instead of an image as images are difficult to work with. The advantage of an Excel file is, we can implement the working solution in your file and send back to you.

@Subodh_Tiwari_sktneerHiya, thankyou for this.


I'm still struggling with it, I really need to brush up! I have attached the document if you are able to implement the working solution in the file please that would be fantastic?! I literally just need the first and last name to appear under the table number headings when a corresponding number is typed in D2.

There are still names to go on the sheet so I have extended the range.


Many Thanks in advance




Please find the attached with the formulas in place. You only need to enter the table number in column D and the names will be populated in the relevant table automatically as per the entered number.


Also, note that I have added a custom number formatting for all the table headers (green cells) so that they contain only a number but a prefix of Table is added to all of them. e.g. if you look at the cell F1, it contains a number 1 but the cell shows you the text "Table 1" where the "Table" prefix is added through the custom number formatting whereas the actual cell content is only 1.


If that takes care of your original question, please take a minute to accept the post with the proposed solution as a Best Response/Answer to mark your question as Solved.




Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
46 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
30 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies