I am trying to write a macro to sum the information below onto another page based upon the "pre contract condition". Meaning i want to sum all of "base contract" into one row with the each of the following columns summed so that in the end it appears on the new sheet like the bottom column. My problem is that besides "base contract" the contract condition entries are not static. My question is how do i do a "sumif" with the data based upon an undefined number of conditions and returned the summed result? I have not written a macro like this before and am not sure where to start. (data is attached)