Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Table1.csv -- input file-1
- brand1,brand2,cost1,cost11,cost2,cost22
- xyz,abc, - , - ,675.89,32.45
- xyz,abc,235.78, 0, - ,87.45
- rst,abc,760.67, 0, 0, 987.54
- rst,bbc,-450.45,100,89.78,98
- ust,bbc,456.78, - ,345.32,32
- ust,bbc, - ,32.45,87.54,56.32
- table2.csv -- input file-2
- brandA,brandB,COL
- xyz,abc,spark1
- rst,abc,spark2
- ust,bbc,spark3
- xyz,bbc,spark4
- ust,abc,spark5
- requirement to met:
- 1.replace "-" with zero(we have few -ve values as well)
- 2.
- sumof cost1 in table1 sheet where criteria (brand1 in table1 sheet = brandA in table2 sheet) / sumof cost11 in table1 sheet where criteria (brand1 in table1 sheet = brandA in table2 sheet)
- --(if divide by zero)
- sumof cost2 in table1 sheet where criteria (brand2 in table1 sheet = brandB in table2 sheet) / sumof cost22 in table1 sheet where criteria (brand2 in table1 sheet = brandB in table2 sheet)
- 3. output file should have
Add Comment
Please, Sign In to add comment