Build new table from existing table

reaktorblue

Board Regular
Joined
Aug 8, 2007
Messages
76
Hiyas,

I have a worksheet ("Plugins") that contains a table ("tblPlugins") with one of the columns ("Installed") having data validation that contains Yes/No. I'm trying to build a new table in a separate worksheet based on the condition that if the column ("Installed") has a value of Yes, that the data should exist in the new table.

Is there a way to do this?
 

Some videos you may like

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
45,120
Office Version
365
Platform
Windows
See if this is what you want.

Sheet 'Plugins' with "tblPlugins"

Excel Workbook
ABC
1IDInstalledAmount
2ID1No1
3ID22
4ID3Yes3
5ID4Yes4
6ID5Pending5
7ID6Yes6
Plugins



'Other' sheet with second table, "tblYes". Formula in A2 is copied across and down

Excel Workbook
ABC
1IDInstalledAmount
2))/(tblPlugins:]="Yes"),ROWS(A$2:A2))),"")]ID3Yes3
3ID4Yes4
4ID6Yes6
5
6
7
Other
 

reaktorblue

Board Regular
Joined
Aug 8, 2007
Messages
76
Thank you so much! I'm still running into a bit of an issue. Ideally, I was hoping for the output to be an actual table as opposed to a list or range but, I'm not sure that's possible. This solution does work for the most part but has some quirks but I think it's because I wasn't entirely clear on the data.

Thanks again, I really appreciate your help with this one!

<b>Excel 2010</b><table cellpadding="2.5px" rules="all" style=";background-color: rgb(255,255,255);border: 1px solid;border-collapse: collapse; border-color: rgb(187,187,187)"><colgroup><col width="25px" style="background-color: rgb(218,231,245)" /><col /><col /><col /><col /><col /><col /><col /><col /></colgroup><thead><tr style=" background-color: rgb(218,231,245);text-align: center;color: rgb(22,17,32)"><th></th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th><th>F</th><th>G</th><th>H</th></tr></thead><tbody><tr ><td style="color: rgb(22,17,32);text-align: center;">1</td><td>Name</td><td>URL</td><td>Dependencies</td><td>Description</td><td> Cost </td><td>Server1</td><td>Server2</td><td>Server3</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">2</td><td style=";">Plugin 1</td><td style="text-decoration: underline;color: #0000FF;;">www.plugin1url.com</td><td style="border-top: 1px solid black;;">Test</td><td style="border-top: 1px solid black;;">This is a description</td><td style="text-align: right;border-top: 1px solid black;;"> $ 10.00 </td><td style=";">Yes</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">3</td><td style=";">Plugin 2</td><td style="text-decoration: underline;color: #0000FF;;">www.plugin2url.com</td><td style=";">Test</td><td style=";">So is this</td><td style="text-align: right;;"> $ 5.00 </td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">4</td><td style=";">Plugin 3</td><td style="text-decoration: underline;color: #0000FF;;">www.plugin3url.com</td><td style="text-align: right;;"></td><td style=";">This one too</td><td style="text-align: right;;"></td><td style=";">Yes</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">5</td><td style=";">Plugin 4</td><td style="text-decoration: underline;color: #0000FF;;">www.plugin4url.com</td><td style=";">Test</td><td style=";">Again, this one</td><td style="text-align: right;;"> $ 3.00 </td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">6</td><td style=";">Plugin 5</td><td style="text-decoration: underline;color: #0000FF;;">www.plugin5url.com</td><td style="text-align: right;;"></td><td style=";">Lastly, so is this</td><td style="text-align: right;;"></td><td style=";">Yes</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr></tbody></table><p style="width:8em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid rgb(187,187,187);border-top:none;text-align: center;background-color: rgb(218,231,245);color: rgb(22,17,32)">tblPlugins</p>

Current Output - The problem I'm running into here is blank dependency entries appear as a 0. I'm trying to leave them as blank entries. Additionally, when an entry has no cost, I want to leave it as a blank entry as well.

<b>Excel 2010</b><table cellpadding="2.5px" rules="all" style=";background-color: rgb(255,255,255);border: 1px solid;border-collapse: collapse; border-color: rgb(187,187,187)"><colgroup><col width="25px" style="background-color: rgb(218,231,245)" /><col /><col /><col /><col /><col /></colgroup><thead><tr style=" background-color: rgb(218,231,245);text-align: center;color: rgb(22,17,32)"><th></th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th></tr></thead><tbody><tr ><td style="color: rgb(22,17,32);text-align: center;">1</td><td>Name</td><td>URL</td><td>Dependencies</td><td>Description</td><td> Cost </td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">2</td><td style="border-top: 1px solid black;;">Plugin 1</td><td style="border-top: 1px solid black;text-decoration: underline;color: #0000FF;;">www.plugin1url.com</td><td style="border-top: 1px solid black;;">Test</td><td style="border-top: 1px solid black;;">This is a description</td><td style="text-align: right;border-top: 1px solid black;;"> $ 10.00 </td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">3</td><td style=";">Plugin 3</td><td style="text-decoration: underline;color: #0000FF;;">www.plugin3url.com</td><td style="text-align: right;;">0</td><td style=";">This one too</td><td style="text-align: right;;"> $ - </td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">4</td><td style=";">Plugin 5</td><td style="text-decoration: underline;color: #0000FF;;">www.plugin5url.com</td><td style="text-align: right;;">0</td><td style=";">Lastly, so is this</td><td style="text-align: right;;"> $ - </td></tr></tbody></table><p style="width:5.6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid rgb(187,187,187);border-top:none;text-align: center;background-color: rgb(218,231,245);color: rgb(22,17,32)">Server1</p>

Current Output

<b>Excel 2010</b><table cellpadding="2.5px" rules="all" style=";background-color: rgb(255,255,255);border: 1px solid;border-collapse: collapse; border-color: rgb(187,187,187)"><colgroup><col width="25px" style="background-color: rgb(218,231,245)" /><col /><col /><col /><col /><col /></colgroup><thead><tr style=" background-color: rgb(218,231,245);text-align: center;color: rgb(22,17,32)"><th></th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th></tr></thead><tbody><tr ><td style="color: rgb(22,17,32);text-align: center;">1</td><td>Name</td><td>URL</td><td>Dependencies</td><td>Description</td><td> Cost </td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">2</td><td style="border-top: 1px solid black;;">Plugin 1</td><td style="border-top: 1px solid black;text-decoration: underline;color: #0000FF;;">www.plugin1url.com</td><td style="border-top: 1px solid black;;">Test</td><td style="border-top: 1px solid black;;">This is a description</td><td style="text-align: right;border-top: 1px solid black;;"> $ 10.00 </td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">3</td><td style=";">Plugin 3</td><td style="text-decoration: underline;color: #0000FF;;">www.plugin3url.com</td><td style="text-align: right;;"></td><td style=";">This one too</td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">4</td><td style=";">Plugin 5</td><td style="text-decoration: underline;color: #0000FF;;">www.plugin5url.com</td><td style="text-align: right;;"></td><td style=";">Lastly, so is this</td><td style="text-align: right;;"></td></tr></tbody></table><p style="width:11.2em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid rgb(187,187,187);border-top:none;text-align: center;background-color: rgb(218,231,245);color: rgb(22,17,32)">Desired Output</p>

<table width="85%" cellpadding="2.5px" rules="all" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: rgb(255,255,255);border-collapse: collapse; border-color: rgb(187,187,187)"><thead><tr style=" background-color: rgb(218,231,245);color: rgb(22,17,32)"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">A2</th><td style="text-align:left">=IFERROR(<font color="Blue">INDEX(<font color="Red">tblPlugins[Name],AGGREGATE(<font color="Green">15,6,(<font color="Purple">ROW(<font color="Teal">tblPlugins[Name]</font>)-ROW(<font color="Teal">tblPlugins[[#Headers],[Name]]</font>)</font>)/(<font color="Purple">tblPlugins[[Server1]:[Server1]]="Yes"</font>),ROWS(<font color="Purple">A$2:A2</font>)</font>)</font>),""</font>)</td></tr></tbody></table></td></tr></table><br />
 
Last edited:

Peter_SSs

MrExcel MVP, Moderator
Joined
May 28, 2005
Messages
45,120
Office Version
365
Platform
Windows
Ideally, I was hoping for the output to be an actual table as opposed to a list or range ...
Mine are tables, it is just that Excel jeanie does not show the standard banded table formatting. However, a formula cannot create a table. I created a blank table with ample rows on sheet Server1 below before populating the formulas.

A formula like I have provided that collects data from another table also will not create a hyperlink or copy the currency formatting from the 'Cost' column, you will need to do that formatting in the Server1 table yourself.


The problem I'm running into here is blank dependency entries appear as a 0. I'm trying to leave them as blank entries. Additionally, when an entry has no cost, I want to leave it as a blank entry as well.>
That requires a bit more work from the formula but can be achieved as shown below.

Excel Workbook
ABCDEFGH
1NameURLDependenciesDescriptionCostServer1Server2Server3
2Plugin 1www.plugin1url.comTestThis is a description$10.00Yes
3Plugin 2www.plugin2url.comTestSo is this$5.00
4Plugin 3www.plugin3url.comThis one tooYes
5Plugin 4www.plugin4url.comTestAgain, this one$3.00
6Plugin 5www.plugin5url.comLastly, so is thisYes
tblPlugins



Excel Workbook
ABCDE
1NameURLDependenciesDescriptionCost
2))/(tblPlugins:]=&quot;Yes&quot;),ROWS(A$2:A2)))=&quot;&quot;,&quot;&quot;,INDEX(tblPlugins,AGGREGATE(15,6,(ROW(tblPlugins)-ROW(tblPlugins,]))/(tblPlugins:]=&quot;Yes&quot;),ROWS(A$2:A2)))),&quot;&quot;)]Plugin 1www.plugin1url.comTestThis is a description$10.00
3Plugin 3www.plugin3url.comThis one too
4Plugin 5www.plugin5url.comLastly, so is this
5
6
7
8
9
10
Server1
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,101,956
Messages
5,483,883
Members
407,419
Latest member
Napoleao Paca

This Week's Hot Topics

  • Finding issue in If elseif else with For each Loop
    Finding issue in If elseif else with For each Loop I have tried this below code but i'm getting in Y column filled with W005. Colud you please...
  • MsgBox Error
    Hi Guys, I have the below error show up when i try and run my macro in File1 but works fine if i copy and paste the same code into file2. [ATTACH...
  • CELL FORMAT - IF CONDITION
    My Cell Format is [B]""0.00" Cr". [/B]But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other...
  • Show numbers nearly the same
    Is this possible. I have a number that can change very time eg 0.00001234 Then I have a lot of numbers 0.0000001, 0.0000002, 0.00000004...
  • Please i need your help to create formula
    I need a formula in cell B8 to do this >>if b1=1 then multiply ( cell b8) by 10% ,if b1=2 multiply by 20%,if=3 multiply by 30%. Thank you in...
  • Got error while adding column and filter
    Got error while adding column and filter In column Z has some like "Success" and "Error". I want to add column in AA if the Z cell value is...
Top