The first and the last.... the Alpha and the Omega!
Am honestly having a major roadblock staying within the bounds of MS Excel...
So instead I wrote you some code !!! It is written in Java. Probably not the Best solution
but it does work.
This little java app that will produce the report you want.
I can help you set it up and/or we can share the code and class file via google drive or the cloud...
For email, click on my picture image in my profile and you will see a link to email.
(1) First, copy and paste the source code into a plain text document (like from NOTEPAD) and
save it as AlphaAndOmega.java on the desktop.
(2) Open up MS-DOS prompt and change directory to the desktop....
If you want to compile the program, issue the command :> java AlphaAndOmega.java
The file AlphaAndOmega.class shall be created and appear in the desktop
(3) Save your spreadsheet as *.CSV file on the desktop
(4) Go back to the desktop and issue the command :> java AlphaAndOmega filename.csv
The report you want shall be written to file AlphaAndOmega.csv
you can move and rename it as you like.
========================================================================
import java.io.*;
class AlphaAndOmega
{
void Go(String filename)
{
System.out.println(" Examining file " + filename);
try
{
FileReader fileReader = new FileReader(filename);
BufferedReader bufferedReader = new BufferedReader(fileReader);
FileWriter fileWriter = new FileWriter("AlphaAndOmega.dat");
BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);
String prevDate,prevStrName,inbuff;
String curDate,curName;
inbuff = bufferedReader.readLine();
String[] tokens = inbuff.split(",");
prevStrName = tokens[0];
prevDate = tokens[1];
bufferedWriter.write(inbuff);
bufferedWriter.newLine();
do
{
inbuff = bufferedReader.readLine();
if (inbuff!=null)
{
tokens = inbuff.split(",");
curName = tokens[0];
curDate = tokens[1];
if (curName.compareTo(prevStrName)!=0)
{
String outbuff = prevStrName + "," + prevDate;
bufferedWriter.write(outbuff);
bufferedWriter.newLine();
outbuff = curName + "," + curDate ;
bufferedWriter.write( outbuff);
bufferedWriter.newLine();
}
prevStrName = curName;
prevDate = curDate;
}
else
{
String outbuff = prevStrName + "," + prevDate;
bufferedWriter.write(outbuff);
bufferedWriter.newLine();
}
} while (inbuff != null);
bufferedReader.close();
bufferedWriter.close();
}
catch (IOException ex)
{
System.out.println(" error processing data file");
}
}
public static void main(String args[])
{
(new AlphaAndOmega()).Go(args[0]);
}
}