I cannot figure out the formula for:

If cells B2:34 contains a match of data in cell B37, then I need cell K37 to track costs specified in cells J2:J34. Then I need to repeat the formula replacing B37 with C37 and so on which contains different codes to B37.Can anyone help me, please?

Your question is not clear. Let's look at a few items:

"If cells B2:34 contains a match of data in cell B37"You are asking about matching multiple cells to a single cell. Do you mean if

anycell in B2:B34 matches the contents of B37 or ifeverycell in B2:B34 matches the contents of B37 or do you mean something else?

"I need cell K37 to track costs specified in cells J2:J34"Once again, you mention a single cell vs. a range of cells. What do you mean by

"track costs specified in cells J2:J34"? e.g. the SUM of the cells?

"replacing B37 with C37 and so on""and so on" is not something we can really work with. What exactly do mean by "and so on"?

Keep in mind that we cannot see your spreadsheet from where we are sitting, so you need to provide enough detail for us to be able to understand what you have and what you want.

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Hi DerbyDad03, Thanks for your post and my apologies if my question was not clear. Anyway I have just been sent a fix through another source.

Basically we moved the data in cell B37 to G37 and then applied the following formula and all works as required. Apparently it is easier to set-up a formula if the data is in separate columns, I have no idea if this is the case or not however it all works now and that is what matters.

=SUMIF(B$2:B$34,G37,J$2:J$34)

message edited by Charlzberg

Ask Your Question

Weekly Poll