I am trying to create a batch macro that will output results to multiple files. I have cash flows (A,B,C) that get output to excel workbooks (X,Y,Z) in this way:
X needs A & B
Y needs B
Z needs B & C
I have the first input into the batch macro that lists the file path and tab names for X,Y,Z and I have a second input table that lists the cash flows concurrently. There is a cash flow (CF) for each mapping, meaning cash flow B is listed in the table three times, each with a field listing the path and tab of the destination (dp):
CF-A (dp-X, tab A)
CF-B (dp-X, tab B)
CF-B (dp-Y, tab 
CF-B (dp-Z, tab 
CF-C (dp-Z, tab C)
The batch macro is simply an output data tool set to change the entire path based on the path and tab being passed by the first input.
What is happening is each filepath and tab listed in the first input is being populated with the entire cash flow table, not just the ones specific to that file. So workbook X, tab A has cash flows:
CF-A (dp-X, tab A)
CF-B (dp-X, tab B)
CF-B (dp-Y, tab 
CF-B (dp-Z, tab 
CF-C (dp-Z, tab C)
On top of that, the macro is writing to the same file&tab several times.
I'm hoping this description is enough for someone to help, without me creating a dummy example. Thanks in advance for any help you can offer!