fprintf (stdout, "Selection criterion (row_index and col_index will be replaced with actual cell row and column - both 0 based):");
fscanf  (stdin,  "String", cell_populator);

cell_populator = "cell_selector:=" + cell_populator;

ExecuteCommands (cell_populator);

selection_Size = 0;

for (row_index=0; row_index < CHART_DIMENSIONS[0]; row_index = row_index+1)
{
	for (col_index=0; col_index < CHART_DIMENSIONS[1]; col_index = col_index+1)
	{
		if (cell_selector)
		{
			selection_Size = selection_Size+1;	
		}
	}
}

if (selection_Size)
{
	SELECTED_CHART_ROWS    = {1,selection_Size};
	SELECTED_CHART_COLS	   = {1,selection_Size};
	
	selection_Size = 0;

	for (row_index=0; row_index < CHART_DIMENSIONS[0]; row_index = row_index+1)
	{
		for (col_index=0; col_index < CHART_DIMENSIONS[1]; col_index = col_index+1)
		{
			if (cell_selector)
			{
				SELECTED_CHART_ROWS[selection_Size] = row_index;		
				SELECTED_CHART_COLS[selection_Size] = col_index;		
				selection_Size = selection_Size+1;			
			}
		}
	}

	UPDATE_CHART_SELECTION = 1;
}
else
{
	fprintf (stdout, "\nNo matches found!\n");
}
