![]() |
Help with this formula
IN CELL B28 This formula returns the sum of a range of cells that contain data that starts with a number, such as 1a15, 2a15, 3a15, 1b15, 2b15, etc. =SUMPRODUCT(--(ISNUMBER(-LEFT('Patrol Log'!A22:A43,1)))) Problem is that there is one type of data that starts with a number that I do not want counted in the sum. It is "1desk". How can this formula be changed so as to perform my request. Thank You Brian |
One way:
=SUMPRODUCT(--(ISNUMBER(-LEFT('Patrol Log'!A22:A43,1))),--('Patrol Log'!A22:A43<"1desk")) In article , "Brian" wrote: IN CELL B28 This formula returns the sum of a range of cells that contain data that starts with a number, such as 1a15, 2a15, 3a15, 1b15, 2b15, etc. =SUMPRODUCT(--(ISNUMBER(-LEFT('Patrol Log'!A22:A43,1)))) Problem is that there is one type of data that starts with a number that I do not want counted in the sum. It is "1desk". How can this formula be changed so as to perform my request. Thank You Brian |
Brian,
=SUMPRODUCT(--(ISNUMBER(-LEFT('Patrol Log'!A22:A43,1))))-COUNTIF('Patrol Log'!A22:A43,"1desk") HTH, Bernie MS Excel MVP "Brian" wrote in message ... IN CELL B28 This formula returns the sum of a range of cells that contain data that starts with a number, such as 1a15, 2a15, 3a15, 1b15, 2b15, etc. =SUMPRODUCT(--(ISNUMBER(-LEFT('Patrol Log'!A22:A43,1)))) Problem is that there is one type of data that starts with a number that I do not want counted in the sum. It is "1desk". How can this formula be changed so as to perform my request. Thank You Brian |
How about?
=SUMPRODUCT(--(ISNUMBER(-LEFT('Patrol Log'!A22:A43,1))))-COUNTIF('Patrol Log'!A22:A43,"1desk") Another way =SUMPRODUCT(--(ISNUMBER(-LEFT('Patrol Log'!A22:A43,1))),--(ISERROR(FIND("1desk",'Patrol Log'!A22:A43)))) Best Regards, Peo Sjoblom "Brian" wrote: IN CELL B28 This formula returns the sum of a range of cells that contain data that starts with a number, such as 1a15, 2a15, 3a15, 1b15, 2b15, etc. =SUMPRODUCT(--(ISNUMBER(-LEFT('Patrol Log'!A22:A43,1)))) Problem is that there is one type of data that starts with a number that I do not want counted in the sum. It is "1desk". How can this formula be changed so as to perform my request. Thank You Brian |
=SUMPRODUCT(LEFT('Patrol Log'!A22:A44)*ISERROR(SEARCH
("desk",'Patrol Log'!A22:A44))) HTH Jason Atlanta, GA -----Original Message----- IN CELL B28 This formula returns the sum of a range of cells that contain data that starts with a number, such as 1a15, 2a15, 3a15, 1b15, 2b15, etc. =SUMPRODUCT(--(ISNUMBER(-LEFT('Patrol Log'!A22:A43,1)))) Problem is that there is one type of data that starts with a number that I do not want counted in the sum. It is "1desk". How can this formula be changed so as to perform my request. Thank You Brian . |
All times are GMT +1. The time now is 05:57 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com