Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old January 7th 10, 10:39 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 542
Default VBA moving and adding data

I have this appliaction that spits out a format that is not usable for me,
but with some minor changes it would be good to go. I just don't know how
the code would work.

here is what part of my file looks like:
ColumnA Coulmn B Column C Column D
FAULT F02 8
PILLAR 3018169.273 492458.0997 -9771.365343
3017502.798 493106.6833 -8696.365343
3016836.323 493755.2668 -7621.365343
3016169.848 494403.8503 -6546.365343
3015503.373 495052.4339 -5471.365343

Here is what I would like it to look like:
ColumnA ColumnB ColumnC ColumnD ColumnE
PILLAR 3018169.273 492458.0997 -9771.365343 F02
2 3017502.798 493106.6833 -8696.365343 F02
2 3016836.323 493755.2668 -7621.365343 F02
2 3016169.848 494403.8503 -6546.365343 F02
3 3015503.373 495052.4339 -5471.365343 F02

The changes are that below the word Pillar I need it to fill in with 2, 2,
2, 3. There will always be 4 rows below the word PILLAR. The next edit is
that when ever it see's the word Fault I need it to take that Fault name in
this case "F02" in place that in the new column E. Than it can delete the
line with the word "FAULT" in it.

My file will have several of these changes:
FAULT F02 8
PILLAR 3018169.273 492458.0997 -9771.365343
3017502.798 493106.6833 -8696.365343
3016836.323 493755.2668 -7621.365343
3016169.848 494403.8503 -6546.365343
3015503.373 495052.4339 -5471.365343
PILLAR 3020447.789 492879.3342 -9810.206268
3019781.72 493506.5923 -8735.206268
3019115.651 494133.8503 -7660.206268
3018449.582 494761.1083 -6585.206268
3017783.513 495388.3663 -5510.206268
FAULT F01 12
PILLAR 3003939.811 477721.429 -9506.335762
3003782.961 478547.8341 -8209.876673
3003626.112 479374.2393 -6913.417583
3003469.262 480200.6444 -5616.958494
3003312.412 481027.0496 -4320.499404
PILLAR 3024619.206 495966.8091 -9807.286549
3023966.167 496558.5893 -8732.286549
3023313.128 497150.3695 -7657.286549
3022660.089 497742.1497 -6582.286549
3022007.05 498333.9300 -5507.286549

So you can see where it gets complicated from time to time. Thank you for
the help.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding digits with moving decimals Loadmaster Excel Worksheet Functions 4 December 7th 09 06:56 AM
Adding one to two figures with moving decimals Loadmaster Excel Worksheet Functions 0 November 26th 09 08:42 PM
Moving Data between sheets in the same workbook and moving data between Workbooks. Alison Brown Excel Worksheet Functions 0 February 10th 09 01:03 AM
Adding rows without the links moving Harlan Excel Worksheet Functions 3 November 3rd 06 01:03 AM
Moving data labels around with VBA (and adding a line between two Caro-Kann Defence Charts and Charting in Excel 4 November 30th 05 08:51 AM


All times are GMT +1. The time now is 04:56 PM.

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright 2004-2019 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"

 

Copyright © 2017