Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Excel Macro Question?

What I want my macro (or cell) to be able to do is to sum select numbers from a column. The way I want it to select a particular cell is to have a numeric identifier in the adjacent cell. For example, if cell A2, A4, A6, and A7 have a value of "1", I would like it to sum cells B2, B4, B6, and A7. What would be the simplest way to do this in excel?

Update:

Thanks C Master, that is exactly what I was looking for my spreadsheet to do!

1 Answer

Relevance
  • 9 years ago
    Favorite Answer

    use the SUMIF function

    =SUMIF(A1:A10,1,B1:B10) would sum all cells in B1:B10 with a 1 directly to their left in A1:A10

    hope that helps

Still have questions? Get your answers by asking now.