Re: [libreoffice-users] Re: CALC - How to count blank cells?
On 09/07/12 20:35, Andreas Säger wrote: Am 09.07.2012 10:22, MiguelAngel wrote: El 09/07/12 3:31, Simon Cropper escribió: On 09/07/12 11:01, Michael Reich wrote: On 7/4/12 11:00 AM, users+h...@global.libreoffice.org wrote: Subject: Re: [libreoffice-users] CALC - How to count blank cells? From: MiguelAngel Date: 7/4/12 3:44 AM To: users@global.libreoffice.org El 04/07/12 5:16, dave wagner escribió: I have a small range of cells (less than 100) in which I need to count the cells that are blank. What is the best way to do this? I was trying something like "=COUNTIF(C11:C103,(CELL("Type",b)))".But that just did not work. Thanks to all who helps me with this simple problem. =SUMPRODUCT(ISBLANK(C11:C103)) Miguel Ángel. In a related (I think) question, what formula could be used to identify the last row in a spreadsheet with data in it? It's a similar situation as the OP, in which new data is inserted as a new row at the bottom of the sheet. I want another worksheet to be able to pick up certain fields from the last row of data, but haven't been able to figure out how to locate which row is last (with data). A1=a A2=b A3=c A4=d What I'm looking for is a formula that would tell me, in the above data, that row 4 is the last one with data. Thanks for any help! I know that this is not what you asked for exactly, but coupled with CELL() or COUNTBLANK() function, might allow you to establish the row number in your situation. The following allows me to get the last value of the column (F) in sheet1 (used in my case in a summary table that lists the final value in a column that lists the running balance of my bank account)... =OFFSET($'sheet1'.$F$6,COUNTA($'sheet1'.$F$6:$'sheet1'.$F$9633)-1,0) Assumes the range $F$6: to $F$9633 has continuous data - essentially it returns the number of rows/cells with data, so will not work if your array or range has blanks (unless the number is static or can be predicted). So in your example... COUNTA(A1:A1000) will return 4, knowing that you start from A1 allows you to extrapolate that the last row is A4. =SUMPRODUCT(MAX(NOT(iSBLANK(c11:c999))*ROW(c11:c999))) give the number of the last row with data in the range. Miguel Ángel. And all these tricks are completely obsolete if you know how to navigate, expand and edit spreadsheet ranges with a couple of keystrokes. By the way: If you would use a database in the first place the editor of your data would not even need to know that. No doubt but Michael asked a question and others helped by answering. If he wanted to know how it should be done or what would be the best way of achieving an end result I presume he would have asked. The fact is he did not actually provide any guidance to why he needed to do what he asked (which is quite common on this forum), only asked if it could be done. IMHO, the tone and content of your response is not very helpful and belittles other peoples attempts to assist. Outlining the keystrokes mentioned and how databases might assist in what you presume he needs would have been more useful. -- Cheers Simon Simon Cropper - Open Content Creator Free and Open Source Software Workflow Guides Introduction http://www.fossworkflowguides.com GIS Packages http://www.fossworkflowguides.com/gis bash / Pythonhttp://www.fossworkflowguides.com/scripting -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
RE: [libreoffice-users] Re: CALC - How to count blank cells?
Hi :) +1 The same problem happens in Excel too. I tend to make those buffer-zones quite small so they help emphasise the totals rows or columns. Regards from Tom :) --- On Thu, 5/7/12, Dennis E. Hamilton wrote: From: Dennis E. Hamilton Subject: RE: [libreoffice-users] Re: CALC - How to count blank cells? To: users@global.libreoffice.org Date: Thursday, 5 July, 2012, 3:52 @dave_ When I have an expanding set of rows, I include a blank buffer row after the last one, and I include that row in any ranges. If there is a row that will always be outside the range, before the beginning and after the end, and have no data, I will anchor my ranges on that spread. Then when adding rows, I always use the insert rows feature so that even for new rows on the end of the data, an Insert Row with the buffer row selected will make a new one above the buffer and automatically included in the range. (Of course, inserting at other internal rows of the selection also works just fine to expand the range of the selection.) But that is for data that I build up incrementally. I don't know what your use case is. More complex cases involving special cells with unique flag values take more involved work and I've never needed to do that. - Dennis -Original Message- From: Simon Cropper [mailto:simoncrop...@fossworkflowguides.com] Sent: Wednesday, July 04, 2012 16:46 To: users@global.libreoffice.org Subject: Re: [libreoffice-users] Re: CALC - How to count blank cells? On 05/07/12 05:22, dave_ wrote: > Thanks to both Simon and Miguel for their solution (they both works). > > One more question and this problem is solved for good. > > I notice I give a range larger than the actual data (rows) needed. > > How can I limit the range based on the last row that has data? > > This will give me an actual count of blanks cells within the rows being > added. > > > Again, thanks for the help or should I say "for the support". > > -- > View this message in context: > http://nabble.documentfoundation.org/CALC-How-to-count-blank-cells-tp3993572p3993714.html > Sent from the Users mailing list archive at Nabble.com. > It is a bit unclear what you are trying to do. It appears you are trying to establish the number of rows with data in them for some sort of import/reiteration routine. Maybe what you should be doing is counting how many values in your range using COUNTA(), DCOUNT() or DCOUNTA() rather than looking for the number of blanks, the last cell used and presumably the difference between these two values. -- Cheers Simon [ ... ] -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
RE: [libreoffice-users] Re: CALC - How to count blank cells?
@dave_ When I have an expanding set of rows, I include a blank buffer row after the last one, and I include that row in any ranges. If there is a row that will always be outside the range, before the beginning and after the end, and have no data, I will anchor my ranges on that spread. Then when adding rows, I always use the insert rows feature so that even for new rows on the end of the data, an Insert Row with the buffer row selected will make a new one above the buffer and automatically included in the range. (Of course, inserting at other internal rows of the selection also works just fine to expand the range of the selection.) But that is for data that I build up incrementally. I don't know what your use case is. More complex cases involving special cells with unique flag values take more involved work and I've never needed to do that. - Dennis -Original Message- From: Simon Cropper [mailto:simoncrop...@fossworkflowguides.com] Sent: Wednesday, July 04, 2012 16:46 To: users@global.libreoffice.org Subject: Re: [libreoffice-users] Re: CALC - How to count blank cells? On 05/07/12 05:22, dave_ wrote: > Thanks to both Simon and Miguel for their solution (they both works). > > One more question and this problem is solved for good. > > I notice I give a range larger than the actual data (rows) needed. > > How can I limit the range based on the last row that has data? > > This will give me an actual count of blanks cells within the rows being > added. > > > Again, thanks for the help or should I say "for the support". > > -- > View this message in context: > http://nabble.documentfoundation.org/CALC-How-to-count-blank-cells-tp3993572p3993714.html > Sent from the Users mailing list archive at Nabble.com. > It is a bit unclear what you are trying to do. It appears you are trying to establish the number of rows with data in them for some sort of import/reiteration routine. Maybe what you should be doing is counting how many values in your range using COUNTA(), DCOUNT() or DCOUNTA() rather than looking for the number of blanks, the last cell used and presumably the difference between these two values. -- Cheers Simon [ ... ] -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted
Re: [libreoffice-users] Re: CALC - How to count blank cells?
On 05/07/12 05:22, dave_ wrote: Thanks to both Simon and Miguel for their solution (they both works). One more question and this problem is solved for good. I notice I give a range larger than the actual data (rows) needed. How can I limit the range based on the last row that has data? This will give me an actual count of blanks cells within the rows being added. Again, thanks for the help or should I say "for the support". -- View this message in context: http://nabble.documentfoundation.org/CALC-How-to-count-blank-cells-tp3993572p3993714.html Sent from the Users mailing list archive at Nabble.com. It is a bit unclear what you are trying to do. It appears you are trying to establish the number of rows with data in them for some sort of import/reiteration routine. Maybe what you should be doing is counting how many values in your range using COUNTA(), DCOUNT() or DCOUNTA() rather than looking for the number of blanks, the last cell used and presumably the difference between these two values. -- Cheers Simon Simon Cropper - Open Content Creator Free and Open Source Software Workflow Guides Introduction http://www.fossworkflowguides.com GIS Packages http://www.fossworkflowguides.com/gis bash / Pythonhttp://www.fossworkflowguides.com/scripting -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/ Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette List archive: http://listarchives.libreoffice.org/global/users/ All messages sent to this list will be publicly archived and cannot be deleted