Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default If line ends in assigned value then change item in COMMENT.


I have an Excel file with text records, 1000s of lines long
Trancriptions of Customer sales reps and Customers, or Distributors

All data is in Collum A.


Each Record has 7-10 Entries

______________________
BILLNUM : 060501
ORIG : 12345678909090
REP : 45672222222222
AREA : LK787878000000
SD : 060401
ED : 062025
COMMENT : CUSOMTER CONVERVERSATION WITH REP
C:HELLO
R:HELLO
C:MAY I HELP YOU
R:BALANCE PLEASE
etc....


_____________________
BILLNUM : 050301
ORIG : 2222222222
REP : 345678909090
AREA : LK787878000000
SD : 030403
ED : 022024
COMMENT : CUSOMTER CONVERVERSATION WITH Distro
C:HELLO
R:HELLO
C:We must have been dissconnected, sir
R:Yes, thank you
etc....


This example above could exist with different combinations, same order
each
time, fields are unique...


I need a bit of VB code (MACRO) that looks at the line
that begins ORIG and the line that begins with REP field and looks
to see which line ends with a known value to be input reight before
macro runs.
Perhaps paste into any cell in a collum other than 'A'

I am only searching the last 6-8 numbers that end the lines
ORIG
REP


If ORIG ends in the last 6-8 numbers then replace "C:" as #: In the
Comment Field
IF REP ends in the last 6-8 numbers then replace "R:" as #: In the
Comment Field

in this case we look for 909090

THere could be 100's of records

Between each record there are a few empty lines... this is where the
MACRO would reset


Here is the way I picture the output changing

______________________
BILLNUM : 060501
ORIG : 12345678909090
REP : 45672222222222
AREA : LK787878000000
SD : 060401
ED : 062025
COMMENT : CUSOMTER CONVERVERSATION WITH REP
#:HELLO
R:HELLO
#:MAY I HELP YOU
R:BALANCE PLEASE
etc....


_____________________
BILLNUM : 050301
ORIG : 2222222222
REP : 345678909090
AREA : LK787878000000
SD : 030403
ED : 022024
COMMENT : CUSOMTER CONVERVERSATION WITH Distro
C:HELLO
#:HELLO
C:We must have been dissconnected, sir
#:Yes, thank you
etc....



This way I always know # represents the customer when I look at the
COMMENT field.

I hope you can help.....


--
chesspupil
------------------------------------------------------------------------
chesspupil's Profile: http://www.excelforum.com/member.php...o&userid=34645
View this thread: http://www.excelforum.com/showthread...hreadid=544130

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
Connectors or line ends to fixed cells when they move? Useprecedents? tskogstrom Excel Discussion (Misc queries) 2 March 23rd 09 11:55 AM
Excel 2003 data import wizard does not support line ends in fields ChrisLime Excel Discussion (Misc queries) 0 February 25th 09 12:07 PM
Line Item Pam Excel Worksheet Functions 2 November 20th 07 10:52 PM
Assigned macros change location markvi Excel Discussion (Misc queries) 3 April 6th 06 06:48 PM
Change the assigned chart number Al Eaton Excel Programming 2 July 26th 04 02:00 AM


All times are GMT +1. The time now is 12:27 PM.

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

About Us

"It's about Microsoft Excel"