nick262b
Mechanical
- Apr 17, 2013
- 25
Hi guys,
I have a large spreadsheet of data that I am trying to extract data from and put into .txt files for a programme I have got for joint analysis.
My problem is that I have one cell that informs me whether or not the joint is on the shell or the channel of a heat exchanger.
Depending on that answer I want to check either the shell or channel column to see if it contains liquid or gas and then assign a value in a separate spreadsheet dependant on the result.
So essentially I have one overarching loop (red) and two sub loops (green and blue).
Check Cell x for shell or channel (as text)
If Cell x is shell Check Cell y for Oil, water or Gas (as text)
If Cell y is Oil or Water then Value = 1
Else If Cell y is Gas then Value =0
End If
Else If Cell x is channel Check Cell z for Oil, water or Gas (as text)
If Cell z is Oil or Water then Value = 1
Else If Cell z is Gas then Value =0
End If
End If
I cannot get this to work and have had a stab using Instr command to some success I just cant get the loop logic to work. If anyone has experience in embedding loops etc I would really appreciate any help. E.g. when I type an else statement how do I know which If statement it corresponds too?
Kind Regards,
Nick
I have a large spreadsheet of data that I am trying to extract data from and put into .txt files for a programme I have got for joint analysis.
My problem is that I have one cell that informs me whether or not the joint is on the shell or the channel of a heat exchanger.
Depending on that answer I want to check either the shell or channel column to see if it contains liquid or gas and then assign a value in a separate spreadsheet dependant on the result.
So essentially I have one overarching loop (red) and two sub loops (green and blue).
Check Cell x for shell or channel (as text)
If Cell x is shell Check Cell y for Oil, water or Gas (as text)
If Cell y is Oil or Water then Value = 1
Else If Cell y is Gas then Value =0
End If
Else If Cell x is channel Check Cell z for Oil, water or Gas (as text)
If Cell z is Oil or Water then Value = 1
Else If Cell z is Gas then Value =0
End If
End If
I cannot get this to work and have had a stab using Instr command to some success I just cant get the loop logic to work. If anyone has experience in embedding loops etc I would really appreciate any help. E.g. when I type an else statement how do I know which If statement it corresponds too?
Kind Regards,
Nick