Hi all, ive been searching the web for answers over the weekend but to no avail.
i have no knowledge on vba codes so go easy on me. i would need help on the following:
1. when i click the button, it opens file directory C:\desktop\
2. i will proceed to select .txt or .csv file
3. upon selection, the data in the file will be imported to excel (in the same sheet where i click the button). eg. button position at A1, data imported start from A2
4. below is the sample data in .txt file
"Channel:" "CH4 "
"Description: " "LoadingR "
"Span " 5000
"Zero " 0
"F.S.D. " "0005000"
"Offset " "0000000"
"Units" " "
"Linear " "Interval:" "00:00:01"
"Delayd" "Delay:" "00:00:00"
"----------------------------------------------------------------"
"Nu." "Date" "Time" "Seconds" "Base" "Divs" "Value"
"1" "16NOV/15" "15:33:22" 0 0 92 "0000092"
"2" "16NOV/15" "15:33:23" 1 1 94 "0000094"
"3" "16NOV/15" "15:33:24" 2 2 95 "0000095"
"4" "16NOV/15" "15:33:25" 3 3 92 "0000092"
"5" "16NOV/15" "15:33:26" 4 4 92 "0000092"
"6" "16NOV/15" "15:33:27" 5 5 92 "0000092"
"----------------------------------------------------------------"
"Channel:" "CH6 "
"Description: " "LVDT "
"Span " 2500
"Zero " 0
"F.S.D. " "0025.00"
"Offset " "0000.00"
"Units" "mm "
"Linear " "Interval:" "00:00:01"
"Delayd" "Delay:" "00:00:00"
"----------------------------------------------------------------"
"Nu." "Date" "Time" "Seconds" "Base" "Divs" "Value"
"1" "16NOV/15" "15:33:22" 0 0 22 "0000.22"
"2" "16NOV/15" "15:33:23" 1 1 22 "0000.22"
"3" "16NOV/15" "15:33:24" 2 2 24 "0000.24"
"4" "16NOV/15" "15:33:25" 3 3 25 "0000.25"
"5" "16NOV/15" "15:33:26" 4 4 27 "0000.27"
"6" "16NOV/15" "15:33:27" 5 5 29 "0000.29"
"----------------------------------------------------------------"
"Channel:" "CH14 "
"Description: " "Load Cel "
"Span " 2500
"Zero " 0
"F.S.D. " "002.500"
"Offset " "000.000"
"Units" "1kN "
"Linear " "Interval:" "00:00:01"
"Delayd" "Delay:" "00:00:00"
"----------------------------------------------------------------"
"Nu." "Date" "Time" "Seconds" "Base" "Divs" "Value"
"1" "16NOV/15" "15:33:22" 0 0 -6 "-00.006"
"2" "16NOV/15" "15:33:23" 1 1 -6 "-00.006"
"3" "16NOV/15" "15:33:24" 2 2 -6 "-00.006"
"4" "16NOV/15" "15:33:25" 3 3 -4 "-00.004"
"5" "16NOV/15" "15:33:26" 4 4 -4 "-00.004"
"6" "16NOV/15" "15:33:27" 5 5 -4 "-00.004"
"----------------------------------------------------------------"
5. i will need values from channel CH6 & channel CH14 only
6. CH6 values will be paste into excel from A2 onwards & CH14 from M2 onwards
7. i will need "Nu." "Date" "Time" "Seconds" "Base" "Divs" "Value" data to be in individual columns.
8. heres the tricky part. the sample above shows data from number 1-6. this is not the case for different .txt files whereby the data could be from number 1-223, 1-346,etc...the number of data generated in each .txt file is dependent of the test duration.
9. so how do i tell excel that i want to import the data for CH6 to be paste in cell A2 onwards & CH14 in cell M2 onwards?
im amist of slitting my wrist if this have no solution. its really time consuming to copy and paste every data manually.
any help is greatly appreciated!
Ouble
i have no knowledge on vba codes so go easy on me. i would need help on the following:
1. when i click the button, it opens file directory C:\desktop\
2. i will proceed to select .txt or .csv file
3. upon selection, the data in the file will be imported to excel (in the same sheet where i click the button). eg. button position at A1, data imported start from A2
4. below is the sample data in .txt file
"Channel:" "CH4 "
"Description: " "LoadingR "
"Span " 5000
"Zero " 0
"F.S.D. " "0005000"
"Offset " "0000000"
"Units" " "
"Linear " "Interval:" "00:00:01"
"Delayd" "Delay:" "00:00:00"
"----------------------------------------------------------------"
"Nu." "Date" "Time" "Seconds" "Base" "Divs" "Value"
"1" "16NOV/15" "15:33:22" 0 0 92 "0000092"
"2" "16NOV/15" "15:33:23" 1 1 94 "0000094"
"3" "16NOV/15" "15:33:24" 2 2 95 "0000095"
"4" "16NOV/15" "15:33:25" 3 3 92 "0000092"
"5" "16NOV/15" "15:33:26" 4 4 92 "0000092"
"6" "16NOV/15" "15:33:27" 5 5 92 "0000092"
"----------------------------------------------------------------"
"Channel:" "CH6 "
"Description: " "LVDT "
"Span " 2500
"Zero " 0
"F.S.D. " "0025.00"
"Offset " "0000.00"
"Units" "mm "
"Linear " "Interval:" "00:00:01"
"Delayd" "Delay:" "00:00:00"
"----------------------------------------------------------------"
"Nu." "Date" "Time" "Seconds" "Base" "Divs" "Value"
"1" "16NOV/15" "15:33:22" 0 0 22 "0000.22"
"2" "16NOV/15" "15:33:23" 1 1 22 "0000.22"
"3" "16NOV/15" "15:33:24" 2 2 24 "0000.24"
"4" "16NOV/15" "15:33:25" 3 3 25 "0000.25"
"5" "16NOV/15" "15:33:26" 4 4 27 "0000.27"
"6" "16NOV/15" "15:33:27" 5 5 29 "0000.29"
"----------------------------------------------------------------"
"Channel:" "CH14 "
"Description: " "Load Cel "
"Span " 2500
"Zero " 0
"F.S.D. " "002.500"
"Offset " "000.000"
"Units" "1kN "
"Linear " "Interval:" "00:00:01"
"Delayd" "Delay:" "00:00:00"
"----------------------------------------------------------------"
"Nu." "Date" "Time" "Seconds" "Base" "Divs" "Value"
"1" "16NOV/15" "15:33:22" 0 0 -6 "-00.006"
"2" "16NOV/15" "15:33:23" 1 1 -6 "-00.006"
"3" "16NOV/15" "15:33:24" 2 2 -6 "-00.006"
"4" "16NOV/15" "15:33:25" 3 3 -4 "-00.004"
"5" "16NOV/15" "15:33:26" 4 4 -4 "-00.004"
"6" "16NOV/15" "15:33:27" 5 5 -4 "-00.004"
"----------------------------------------------------------------"
5. i will need values from channel CH6 & channel CH14 only
6. CH6 values will be paste into excel from A2 onwards & CH14 from M2 onwards
7. i will need "Nu." "Date" "Time" "Seconds" "Base" "Divs" "Value" data to be in individual columns.
8. heres the tricky part. the sample above shows data from number 1-6. this is not the case for different .txt files whereby the data could be from number 1-223, 1-346,etc...the number of data generated in each .txt file is dependent of the test duration.
9. so how do i tell excel that i want to import the data for CH6 to be paste in cell A2 onwards & CH14 in cell M2 onwards?
im amist of slitting my wrist if this have no solution. its really time consuming to copy and paste every data manually.
any help is greatly appreciated!
Ouble
Last edited: