Dynamic Range Expansion (No VBA)

sooshil

Board Regular
Joined
Feb 21, 2013
Messages
104
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
Hi

I want to dynamically expand my data as follows without using VBA.

I have text data in a single column. There is no empty cells in between the data but the number of rows having data can vary.
[TABLE="class: cms_table_grid, width: 200, align: left"]
<tbody>[TR]
[TD="align: center"]Names[/TD]
[/TR]
[TR]
[TD]John[/TD]
[/TR]
[TR]
[TD]Sam[/TD]
[/TR]
[TR]
[TD]Jessica[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


I want my result as follows.
[TABLE="class: cms_table_grid, width: 200, align: left"]
<tbody>[TR]
[TD="align: center"]Matches[/TD]
[/TR]
[TR]
[TD]John Vs Sam[/TD]
[/TR]
[TR]
[TD]John Vs Jessica[/TD]
[/TR]
[TR]
[TD]Sam Vs Jessica[/TD]
[/TR]
</tbody>[/TABLE]


If I add one more data:

[TABLE="class: cms_table_grid, width: 200, align: left"]
<tbody>[TR]
[TD="align: center"]Names[/TD]
[/TR]
[TR]
[TD]John[/TD]
[/TR]
[TR]
[TD]Sam[/TD]
[/TR]
[TR]
[TD]Jessica[/TD]
[/TR]
[TR]
[TD]Peter[/TD]
[/TR]
[TR]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


I want my result updated automatically as follows.
[TABLE="class: cms_table_grid, width: 200, align: left"]
<tbody>[TR]
[TD="align: center"]Matches[/TD]
[/TR]
[TR]
[TD]John Vs Sam[/TD]
[/TR]
[TR]
[TD]John Vs Jessica[/TD]
[/TR]
[TR]
[TD]John Vs Peter[/TD]
[/TR]
[TR]
[TD]Sam Vs Jessica[/TD]
[/TR]
[TR]
[TD]Sam Vs Peter[/TD]
[/TR]
[TR]
[TD]Jessica Vs Peter[/TD]
[/TR]
</tbody>[/TABLE]


Any help would be highly appreciated. But, again, only Formulas, NO VBA.
Thank you.

 
And they're not as old as me‼

I must find the time/interest to start using Power Query on day.

Keep promoting it, Sandy. Hope you have more success than I have with MS Query (promoting, that is).
Both awesome tools and too little known.

As I like to say, a little SQL can do a lot of heavy lifting.
 
Upvote 0

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
SQL? 70's :)
Honestly, Power Query is the successor of MS Query but it is known that MS is not too fast in implementing anything so PQ took a long time so I will not write anything about promotion, it's a bad for health ;)
 
Last edited:
Upvote 0
Thank you so much all of you for this nice conversation.
Yeah, the second query of Fazza solves my problem exactly as I wanted to. Thank you. :)

God bless you.
 
Upvote 0

Forum statistics

Threads
1,223,577
Messages
6,173,163
Members
452,503
Latest member
AM74

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