my goal is to set up the excel file like this:

list of foods in column A
food group options in columns B - E
mark appropriate food group column with "x"
in columns H - K, paste all foods in column B with an "x" into H, all foods in column C with an "x" into I, and so on and so forth

there are about 20 foods listed in column A, with the food groups not sorted vertically (ie. column B food group in cells A3 and A12, column C food group in cells A5, A9, A16). I would like to write a file that can search through column B, C, etc. find the cells marked with an "x", and display the respective cells column A equivalent into column H, I, etc.

The problem I am having is with the pasting of the column A output. I can only get it so that the A output will show up in the same row as the input, I would like it so the results show up in consecutive H,I, etc. vertical cells regardless of position in A.

Input: "x" in B3 and B12.
What I want Output: A3 and A12 in H2, H3.
What I have Output: A3 and A12 in H3 and H12

Apologies about length, hope what i want was clear, i appreciate all comments.

thanks,
David