![]() |
Using text as a criteria in Excel
I am trying to get a value in excel where the criteria that has to be
satisfied are text in nature, but I do not what to type the text in the formula but the cell reference. I have use Sumif, If & And but no joy. I hoping someone will be able to help. Thanks Tunde |
Using text as a criteria in Excel
Try this:
=IF(A1="some text",action_if_true,action_if_false) or =SUMIF(range_to_test,"some text",range_to_sum) You must put quotes around the text. Hope this helps. Pete On Apr 16, 12:24 pm, Baba wrote: I am trying to get a value in excel where the criteria that has to be satisfied are text in nature, but I do not what to type the text in the formula but the cell reference. I have use Sumif, If & And but no joy. I hoping someone will be able to help. Thanks Tunde |
Using text as a criteria in Excel
Criteria to be entered into A1, can be text *OR* numeric:
If the formula is referencing a cell, *no* quotes are needed around the cell reference. =Sumif(B1:B100,A1,C1:C100) As long as B1 to B100 are supposed to *match* the text in A1. If B1 to B100 contains *only part* of the criteria (criteria="b" - AND - B1:B100="abc", "bad", "cab", ... etc.), use this: =SUMIF(B1:B100,"*"&A1&"*",C1:C100) -- HTH, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "Baba" wrote in message ... I am trying to get a value in excel where the criteria that has to be satisfied are text in nature, but I do not what to type the text in the formula but the cell reference. I have use Sumif, If & And but no joy. I hoping someone will be able to help. Thanks Tunde |
Using text as a criteria in Excel
Pete,
Thanks for your response, it helped in solving the problem. Tunde "Pete_UK" wrote: Try this: =IF(A1="some text",action_if_true,action_if_false) or =SUMIF(range_to_test,"some text",range_to_sum) You must put quotes around the text. Hope this helps. Pete On Apr 16, 12:24 pm, Baba wrote: I am trying to get a value in excel where the criteria that has to be satisfied are text in nature, but I do not what to type the text in the formula but the cell reference. I have use Sumif, If & And but no joy. I hoping someone will be able to help. Thanks Tunde |
Using text as a criteria in Excel
Thanks for feeding back, Tunde.
Pete On Apr 17, 10:38 am, Baba wrote: Pete, Thanks for your response, it helped in solving the problem. Tunde "Pete_UK" wrote: Try this: =IF(A1="some text",action_if_true,action_if_false) or =SUMIF(range_to_test,"some text",range_to_sum) You must put quotes around the text. Hope this helps. Pete On Apr 16, 12:24 pm, Baba wrote: I am trying to get a value in excel where the criteria that has to be satisfied are text in nature, but I do not what to type the text in the formula but the cell reference. I have use Sumif, If & And but no joy. I hoping someone will be able to help. Thanks Tunde- Hide quoted text - - Show quoted text - |
All times are GMT +1. The time now is 03:29 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com