ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Wildcards in Formulas (https://www.excelbanter.com/excel-discussion-misc-queries/43555-wildcards-formulas.html)

GOL

Wildcards in Formulas
 
Im attempting to write a formula that looks like this:

If(A2="***/5",B2*3,0)

All my A column fields end in either /5 or /1, but I only want the /5
affected. Any help please.

KL

Hi,

Try this:

=IF(RIGHT(A2,2)="/5",B2*3,0)

or

=IF(COUNTIF(A2,"*/5"),B2*3,0)


Regards,
KL

"GOL" wrote in message
...
Im attempting to write a formula that looks like this:

If(A2="***/5",B2*3,0)

All my A column fields end in either /5 or /1, but I only want the /5
affected. Any help please.




Dave Peterson

One way:

=if(countif(a2,"*/5"),b2*3,0)

GOL wrote:

Im attempting to write a formula that looks like this:

If(A2="***/5",B2*3,0)

All my A column fields end in either /5 or /1, but I only want the /5
affected. Any help please.


--

Dave Peterson


All times are GMT +1. The time now is 04:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com