If I have three columns but am looking to write a formula IF findstring for column 1(IRON) with partial match data to column 3(SALES), but then, if there is a partial match, I want column 3 to replace the column 1 partial data.
input:
IRON | SUPPLY | SALES |
PO67633 | 4 | PO00902 545 |
PO11211 | 8 | PO67633 889 |
PO00902 | 1 | PO22123 221 |
Output:
IRON | SUPPLY | SALES |
PO67633 889 | 4 | PO00902 545 |
PO11211 | 8 | PO67633 889 |
PO00902 545 | 1 | PO22123 221 |
Thanks in advance
Here is my string so far:
If findString([Sales], [Iron])>=0
THEN
[Sales]
else
""
endif
My string creates additional rows under the Iron Column with a blank row for Supply and
IRON | SUPPLY | SALES |
4 | PO65841 | |
PO11211 | 8 | PO57756 |
1 | PO22123 221 | |
PO67633 889 | PO67633 889 | |
PO00902 545 | PO00902 545 |
In order to effectively do this a standard Formula tool won't suffice, instead you'll need to use aMulti-Row Formula tool. Below (and attached) is one way of doing this:
First place a RecordID tool to allow you to keep the order of the data, then Transpose it vertically. Sort the data on Value so it places the figures in Iron/Sales next to each other, then apply your formula like so:
Cross tab the data back to the horizontal, sort again but this time on RecordID, and finally move the fields around to the original layour/remove the RecordID:
Awesome stuff. It's unfortunate that I cannot use the If findstring method. I will give both methods a try. Thanks for the responses and time!