Help with data parsing

P

Param Dhillon

Hi,
I have data which is in the format below called "Before Data" and I am
trying to get it to "After Data" format. I can do some programming if given
some advice.
As you notice I am trying to repeat data from
ID Long Lat
1 9.5 4

where 4 is number of times value 9.5 is included in Value column of after
data.

Any help would be appreciated.

Before Data After Data
ID Long Lat ID Long Lat Value
1 9.5 4 1 9.5 4
2 -118.727 37.81862 2 -118.727 37.81862 9.5
3 -118.728 37.81875 3 -118.728 37.81875 9.5
4 -118.731 37.81907 4 -118.731 37.81907 9.5
5 -118.735 37.81995 5 -118.735 37.81995 9.5
6 10.5 3 6 10.5 3
7 -118.743 37.82292 7 -118.743 37.82292 10.5
8 -118.744 37.82338 8 -118.744 37.82338 10.5
9 -118.748 37.8261 9 -118.748 37.8261 10.5
 
P

Param Dhillon

Sorry this is how the data looks
Before Data
ID Long Lat
1 9.5 4
2 -118.727 37.81862
3 -118.728 37.81875
4 -118.731 37.81907
5 -118.735 37.81995
6 10.5 3
7 -118.743 37.82292
8 -118.744 37.82338
9 -118.748 37.8261



After Data
ID Long Lat Value
1 9.5 4
2 -118.727 37.81862 9.5
3 -118.728 37.81875 9.5
4 -118.731 37.81907 9.5
5 -118.735 37.81995 9.5
6 10.5 3
7 -118.743 37.82292 10.5
8 -118.744 37.82338 10.5
9 -118.748 37.8261 10.5
 
C

CLR

Hi..........

Assuming your :"Before Data" is in column H, with your row 1 actually Row 3,
then put this formula in Cell I3 and copy
down...........=IF((LEFT(H3,3)*1)<100,H3,I2)

Then put this formula in Cell J3 and copy down............=IF(H3=I3,H3,H3&"
"&LEFT(I3,4))

Column J should then result as your desired "After Data", based on your
sample.

hth
Vaya con Dios,
Chuck, CABGx3
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top