<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Filling partially missing data cells based on non-missing cells in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Filling-partially-missing-data-cells-based-on-non-missing-cells/m-p/218001#M43583</link>
    <description>&lt;P&gt;I cannot test this script but at least it illustrates one approach.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );

map = Associative Array();

For Each Row(
	value 1 = Column(1)[];
	value 2 = Column(2)[];
	value 3 = Column(3)[];
	If( And( Not( Is Missing( value 2 ) ), Not( Is Missing( value 3 ) ) ),
		// complete row, add to map
		map &amp;lt;&amp;lt; Insert( value 1, Eval List( value 2, value 3 ) ),
		// incomplete row, use values in map
		Column(2)[] = map[value 1][1];
		Column(3)[] = map[value 1][2];
	);
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So this is meant to run as a script, not as a column formula.&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jul 2019 20:02:24 GMT</pubDate>
    <dc:creator>Mark_Bailey</dc:creator>
    <dc:date>2019-07-18T20:02:24Z</dc:date>
    <item>
      <title>Filling partially missing data cells based on non-missing cells</title>
      <link>https://community.jmp.com/t5/Discussions/Filling-partially-missing-data-cells-based-on-non-missing-cells/m-p/217981#M43577</link>
      <description>&lt;P&gt;Hello, I'm trying to figure out a way to fill in missing cells that should have values that are based on other cells. In my table, some of these cells are properly filled in, while others aren't. Here's a rough example&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Column 1&lt;/TD&gt;&lt;TD&gt;Column 2&lt;/TD&gt;&lt;TD&gt;Column 3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;a&lt;/TD&gt;&lt;TD&gt;a'&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;b&lt;/TD&gt;&lt;TD&gt;b'&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;a&lt;/TD&gt;&lt;TD&gt;a'&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;c&lt;/TD&gt;&lt;TD&gt;c'&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;c&lt;/TD&gt;&lt;TD&gt;c'&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this example, every row that has a '1' in the first column should have an A, and then an A' in the 2nd and 3rd column, respectively. The same goes for 2's needing to have B and B', and 3s needing to have C and C'. However, in some parts of my table, that stops happening. Is there any way I can automatically fill in missing cells based with their correct data, based on the value provided in the first column, and the information that WOULD be in the cell, were it not missing? Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 18:07:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Filling-partially-missing-data-cells-based-on-non-missing-cells/m-p/217981#M43577</guid>
      <dc:creator>KMJHU</dc:creator>
      <dc:date>2019-07-18T18:07:34Z</dc:date>
    </item>
    <item>
      <title>Re: Filling partially missing data cells based on non-missing cells</title>
      <link>https://community.jmp.com/t5/Discussions/Filling-partially-missing-data-cells-based-on-non-missing-cells/m-p/217994#M43580</link>
      <description>edit: In my real table, there are thousands of potential values in column 1, so I can't manually find all rows with the column value and input what I know to be the column 2 and 3 data. What i would need is a formula that goes back and finds the correct information from previously, fully filled out rows, and automatically finishes the row based on the value in column 1. Thanks again!</description>
      <pubDate>Thu, 18 Jul 2019 18:20:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Filling-partially-missing-data-cells-based-on-non-missing-cells/m-p/217994#M43580</guid>
      <dc:creator>KMJHU</dc:creator>
      <dc:date>2019-07-18T18:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: Filling partially missing data cells based on non-missing cells</title>
      <link>https://community.jmp.com/t5/Discussions/Filling-partially-missing-data-cells-based-on-non-missing-cells/m-p/218001#M43583</link>
      <description>&lt;P&gt;I cannot test this script but at least it illustrates one approach.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );

map = Associative Array();

For Each Row(
	value 1 = Column(1)[];
	value 2 = Column(2)[];
	value 3 = Column(3)[];
	If( And( Not( Is Missing( value 2 ) ), Not( Is Missing( value 3 ) ) ),
		// complete row, add to map
		map &amp;lt;&amp;lt; Insert( value 1, Eval List( value 2, value 3 ) ),
		// incomplete row, use values in map
		Column(2)[] = map[value 1][1];
		Column(3)[] = map[value 1][2];
	);
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So this is meant to run as a script, not as a column formula.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2019 20:02:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Filling-partially-missing-data-cells-based-on-non-missing-cells/m-p/218001#M43583</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2019-07-18T20:02:24Z</dc:date>
    </item>
  </channel>
</rss>

