My data doesn't automatically continue when I add info into its associated table

carrrrlitos17

New Member
Joined
Jul 7, 2022
Messages
15
Office Version
  1. 365
Platform
  1. Windows
Hello again,

I find myself with two problems.

Context: I have a table that lists out what each company supplies. If there are multiple products for a company, the company is relisted plus all the contact info and thus, it can get a little repetitive (See img. Table). To combine the info, I had to make that last column to list the combined info, with the function being =COUNTIF($E$2:E2,E2)&":"&TEXTJOIN("|",,D2,B2)

I then made another sheet where companies can be listed and each of their products be listed all in one row, followed by their contact info (so each company only has one row not multiple) (See img Current new sheet).

Continuing to look at that image from left to right, my functions in each Column are as follows:

=UNIQUE(Table2[Company])

=TEXTJOIN(CHAR(10),,FILTER(Table2[For Table],Table2[Company]=A22))

=TEXTJOIN(CHAR(10),,UNIQUE(FILTER(Table2[Contact],Table2[Company]=A22," ")))


I have noticed that when I add a new line(s) to the original table, my process becomes sloppy.

Problem 1) In the table, my last column function seems to lose track and appears like this (see New Table) I notice that the function on what had once been the last row changes from being =COUNTIF($E$2:E261,E261)&":"&TEXTJOIN("|",,D261,B261)
to
=COUNTIF($E$2:E263,E261)&":"&TEXTJOIN("|",,D261,B261)

The problem lies in the range area of the COUNTIF, how do I allow it to keep updating forward?

Problem 2) (see problem 2) the only thing that carries over is the Unique function that lists the company, but the other columns dont fill in.

All in all, my goal is to be able to add new companies to my table and have that data be added to my other sheet without a problem.

Thank you, sorry for the wordy explanation
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Great, than you can use:

Book1
ABCDE
2SupplierGoods/ServicesContactEmailTelephone
3Company A1:Puzzles|supplierSteve Steve@gmail.com78093174
4Company B1:Dominoes|supplier 2:Puzzles|supplierKarloKarlo@gmail.com12347098
5Company C1:Jacks|InstallerAbeAbe@gmail.com43287013
6Company D1:Marbles|SupplierTrishatrisha@gmail.com5324528
Sheet1
Cell Formulas
RangeFormula
A3:A6A3=UNIQUE(Table1[Company])
B3:B6B3=BYROW(A3#,LAMBDA(a,TEXTJOIN(CHAR(10),,FILTER(Table1[For Table],Table1[Company]=a, " "))))
C3:C6C3=BYROW(A3#,LAMBDA(a,TEXTJOIN(CHAR(10),,UNIQUE(FILTER(Table1[Contact],Table1[Company]=a," ")))))
D3:D6D3=BYROW(A3#,LAMBDA(a,TEXTJOIN(CHAR(10),,UNIQUE(FILTER(Table1[Email],Table1[Company]=a," ")))))
E3:E6E3=BYROW(A3#,LAMBDA(a,TEXTJOIN(CHAR(10),,UNIQUE(FILTER(Table1[[Phone ]],Table1[Company]=a," ")))))
Dynamic array formulas.
 
Upvote 0
Solution
Great, than you can use:

Book1
ABCDE
2SupplierGoods/ServicesContactEmailTelephone
3Company A1:Puzzles|supplierSteve Steve@gmail.com78093174
4Company B1:Dominoes|supplier 2:Puzzles|supplierKarloKarlo@gmail.com12347098
5Company C1:Jacks|InstallerAbeAbe@gmail.com43287013
6Company D1:Marbles|SupplierTrishatrisha@gmail.com5324528
Sheet1
Cell Formulas
RangeFormula
A3:A6A3=UNIQUE(Table1[Company])
B3:B6B3=BYROW(A3#,LAMBDA(a,TEXTJOIN(CHAR(10),,FILTER(Table1[For Table],Table1[Company]=a, " "))))
C3:C6C3=BYROW(A3#,LAMBDA(a,TEXTJOIN(CHAR(10),,UNIQUE(FILTER(Table1[Contact],Table1[Company]=a," ")))))
D3:D6D3=BYROW(A3#,LAMBDA(a,TEXTJOIN(CHAR(10),,UNIQUE(FILTER(Table1[Email],Table1[Company]=a," ")))))
E3:E6E3=BYROW(A3#,LAMBDA(a,TEXTJOIN(CHAR(10),,UNIQUE(FILTER(Table1[[Phone ]],Table1[Company]=a," ")))))
Dynamic array formulas.
Thank you, this has worked wonderfully. Just one last detail, is it possible for excel rows to auto-size? I've noticed that if a company sells more than one product, worksheet 2 will add a row for the company, but will only show one product, unless I either extend the row, autofit it, or wrap text.
 
Upvote 0
No, you need to autofit it either manually or using a worksheet event code.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,183
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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