简体   繁体   中英

Multiplying cell data by data in other cells in Excel

I have a rather large worksheet in which I need to average out the numbers from a large array of criteria. Cells A1-452 and C1-452 need to be multiplied together, however the data is different in each row.

To clarify A1 would be multiplied by C1, and so on. Since the data is different in all cells I'm not sure if this is possible to achieve by using an Excel macro.

Any thoughts?

Thanks!

As an array formula this would be simply,

=AVERAGE((A1:A452)*(C1:C452))

An array formula requires Ctrl+Shift+Enter to finalize. That does not take into account the discard of blanks from the average collection. Post a comment if this is a concern.

If I understand your problem correctly, you will need to create a new column and multiply all the cells in it. Column C is the new column and contains a formula A1 * B1, A2 * B2, etc.

在此处输入图片说明

If you cannot create a new column and you need some kind of aggregation, like SUM or AVERAGE, than you can do that in one cell by using an Excel array formula (enter formula and hold CTRL + SHIFT and then hit ENTER). The {} braces will be added automatically by Excel (DO NOT enter them as the formula won't work).

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM