Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21358

Coding for finding and displaying data

$
0
0
I have a large text file from which I want to extract information. As a sample of what my data looks like, I've saved some data in a txt file which has 4 columns. The first one is 'ID' (Unique ID of Vehicles), second is 'Class' (Class of vehicle i.e. 1 means motorcycle, 2 means car and 3 means truck), third is 'Preceding' (ID of vehicle preceding the vehicle in column 1) and the fourth is 'Following' (ID of vehicle following the vehicle in column 1).

I need to write a code which can:

  • Find the number of pairs of car following truck
  • Find the number of pairs of truck following car
  • Report the vehicle IDs of all vehicles in those pairs



I am a newbie in VB and I have no clue how to get my required outputs from data. The excel file is attached. Please help.
Attached Files

Viewing all articles
Browse latest Browse all 21358

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>