mawby Posted August 19, 2008 Share Posted August 19, 2008 I'm trying to populate a section of a spreadsheet with a count of the number of rows in two columns which meet a given criteria. The spreadsheet would be like this... No code has to be inserted here. And the result wanted is this... No code has to be inserted here. Where the values in the cells are a simple count of the number of rows in column A which matches the column heading (100, 200 etc) and where the first three characters of column B also matches the row labels (HUN, TIG) I thought the COUNTIF statement might do it but I can't see how to create a criteria which examines the values of two cells on the same row. Any ideas? Quote Link to comment Share on other sites More sharing options...
MrRalphMan Posted August 19, 2008 Share Posted August 19, 2008 Can you not use a Pivot table? Quote Link to comment Share on other sites More sharing options...
mawby Posted August 19, 2008 Author Share Posted August 19, 2008 I don't know, can I? Quote Link to comment Share on other sites More sharing options...
MrRalphMan Posted August 19, 2008 Share Posted August 19, 2008 Maybe Quote Link to comment Share on other sites More sharing options...
jaymdee Posted August 19, 2008 Share Posted August 19, 2008 There's a function called DSUM which IIRC does something along the lines of what you want Quote Link to comment Share on other sites More sharing options...
mikeyb10supra Posted August 19, 2008 Share Posted August 19, 2008 I would use a pivot and add an extra field on the end which uses the left function to pick out the HUN bit or TIG bit from the code See attached Actually ignore me, this is exactly the same as Mr Ralph mans example ha ha > read all post and look at all attachments before posting This is the way I would do it aswell though Quote Link to comment Share on other sites More sharing options...
MrRalphMan Posted August 20, 2008 Share Posted August 20, 2008 Were these answers what you needed o' holy one? Quote Link to comment Share on other sites More sharing options...
mawby Posted August 21, 2008 Author Share Posted August 21, 2008 I haven't had a chance to test it yet. I'm battling virtual servers which keep killing my machine at the moment. Cheers for replying though, I should hopefully be able to try it around lunch time. Quote Link to comment Share on other sites More sharing options...
mawby Posted August 28, 2008 Author Share Posted August 28, 2008 Finally had a chance to look at this. Yes a pivot table seems to do exactly what I need. Thanks for your help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.