Weaseltron
New Member
- Joined
- Jan 24, 2017
- Messages
- 4
Hi all
This might be a simple request but I cant think of a neat way to do it.
Lets say I have the following table A:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Attachment Name
[/TD]
[TD]Value1
[/TD]
[TD]Value2
[/TD]
[TD] Value3
[/TD]
[TD]Value4
[/TD]
[TD]Value5
[/TD]
[/TR]
[TR]
[TD]file1
[/TD]
[TD]10
[/TD]
[TD]15
[/TD]
[TD]20
[/TD]
[TD]0
[/TD]
[TD]50
[/TD]
[/TR]
[TR]
[TD]file2
[/TD]
[TD]20
[/TD]
[TD]25
[/TD]
[TD]25
[/TD]
[TD]10
[/TD]
[TD]10
[/TD]
[/TR]
[TR]
[TD]file3
[/TD]
[TD]25
[/TD]
[TD]50
[/TD]
[TD]50
[/TD]
[TD]5
[/TD]
[TD]0
[/TD]
[/TR]
</tbody>[/TABLE]
and table B
[TABLE="width: 500"]
<tbody>[TR]
[TD]Client Name
[/TD]
[TD]Value1
[/TD]
[TD]Value2
[/TD]
[TD]Value3
[/TD]
[TD]Value4
[/TD]
[TD]Value5
[/TD]
[TD]Attachment to be used
[/TD]
[/TR]
[TR]
[TD]ClientA
[/TD]
[TD]10
[/TD]
[TD]15
[/TD]
[TD]20
[/TD]
[TD]0
[/TD]
[TD]50
[/TD]
[TD]
[/TR]
[TR]
[TD]ClientB
[/TD]
[TD]20
[/TD]
[TD]25[/TD]
[TD]25[/TD]
[TD]10
[/TD]
[TD]10[/TD]
[TD]
[/TR]
[TR]
[TD]ClientC
[/TD]
[TD]30
[/TD]
[TD]15
[/TD]
[TD]15
[/TD]
[TD]15
[/TD]
[TD]15
[/TD]
[TD]
[/TR]
</tbody>[/TABLE]
What I am trying to do is find a formula to populate the "Attachment to be used" column.
This will need to compare the Value1, Value2 etc fields for each client to the Value1, Value2 etc fields for each attachment file and select the one that matches. It must be a 100% match for each value.
IF the values for a client match exactly the values for a particular attachment it should return that file name (ClientA = file1, ClientB = file2)
IF the vales for a client do not match exactly to an attachment it should return "no match" or something similar (ClientC)
Thanks in advance!
This might be a simple request but I cant think of a neat way to do it.
Lets say I have the following table A:
[TABLE="width: 500"]
<tbody>[TR]
[TD]Attachment Name
[/TD]
[TD]Value1
[/TD]
[TD]Value2
[/TD]
[TD] Value3
[/TD]
[TD]Value4
[/TD]
[TD]Value5
[/TD]
[/TR]
[TR]
[TD]file1
[/TD]
[TD]10
[/TD]
[TD]15
[/TD]
[TD]20
[/TD]
[TD]0
[/TD]
[TD]50
[/TD]
[/TR]
[TR]
[TD]file2
[/TD]
[TD]20
[/TD]
[TD]25
[/TD]
[TD]25
[/TD]
[TD]10
[/TD]
[TD]10
[/TD]
[/TR]
[TR]
[TD]file3
[/TD]
[TD]25
[/TD]
[TD]50
[/TD]
[TD]50
[/TD]
[TD]5
[/TD]
[TD]0
[/TD]
[/TR]
</tbody>[/TABLE]
and table B
[TABLE="width: 500"]
<tbody>[TR]
[TD]Client Name
[/TD]
[TD]Value1
[/TD]
[TD]Value2
[/TD]
[TD]Value3
[/TD]
[TD]Value4
[/TD]
[TD]Value5
[/TD]
[TD]Attachment to be used
[/TD]
[/TR]
[TR]
[TD]ClientA
[/TD]
[TD]10
[/TD]
[TD]15
[/TD]
[TD]20
[/TD]
[TD]0
[/TD]
[TD]50
[/TD]
[TD]
?
[/TD]
[/TR]
[TR]
[TD]ClientB
[/TD]
[TD]20
[/TD]
[TD]25[/TD]
[TD]25[/TD]
[TD]10
[/TD]
[TD]10[/TD]
[TD]
?
[/TD][/TR]
[TR]
[TD]ClientC
[/TD]
[TD]30
[/TD]
[TD]15
[/TD]
[TD]15
[/TD]
[TD]15
[/TD]
[TD]15
[/TD]
[TD]
?
[/TD]
[/TR]
</tbody>[/TABLE]
What I am trying to do is find a formula to populate the "Attachment to be used" column.
This will need to compare the Value1, Value2 etc fields for each client to the Value1, Value2 etc fields for each attachment file and select the one that matches. It must be a 100% match for each value.
IF the values for a client match exactly the values for a particular attachment it should return that file name (ClientA = file1, ClientB = file2)
IF the vales for a client do not match exactly to an attachment it should return "no match" or something similar (ClientC)
Thanks in advance!