ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   If function? (https://www.excelbanter.com/excel-programming/351936-if-function.html)

Paul

If function?
 
Newbie question...I'm looking for the formula that will report the value that
I want in column B. I guess wildcards must nbe used. I tried =IF (A1 =
"*Catalog*", "Catalog", IF(A1 = "*Stock*", "Stock"))

A B
Stock - Rock Stock
Catalog - Indie Catalog
Catalog - Rock Catalog
Stock - Indie Stock

Thanks for your help.

Paul


Chip Pearson

If function?
 
Try

=IF(COUNTIF(A1,"*stock*"),"stock","no stock")


"Paul" wrote in message
...
Newbie question...I'm looking for the formula that will report
the value that
I want in column B. I guess wildcards must nbe used. I tried
=IF (A1 =
"*Catalog*", "Catalog", IF(A1 = "*Stock*", "Stock"))

A B
Stock - Rock Stock
Catalog - Indie Catalog
Catalog - Rock Catalog
Stock - Indie Stock

Thanks for your help.

Paul




Tom Ogilvy

If function?
 
=if(countif(A1,"*Catalog*"),"Catalog",if(countif(A 1,"*Stock*"),"Stock","not
found"))

--
Regards,
Tom Ogilvy


"Paul" wrote in message
...
Newbie question...I'm looking for the formula that will report the value

that
I want in column B. I guess wildcards must nbe used. I tried =IF (A1 =
"*Catalog*", "Catalog", IF(A1 = "*Stock*", "Stock"))

A B
Stock - Rock Stock
Catalog - Indie Catalog
Catalog - Rock Catalog
Stock - Indie Stock

Thanks for your help.

Paul




Paul

If function?
 
Thanks chips, but what happens with my other variable?

"Chip Pearson" wrote:

Try

=IF(COUNTIF(A1,"*stock*"),"stock","no stock")


"Paul" wrote in message
...
Newbie question...I'm looking for the formula that will report
the value that
I want in column B. I guess wildcards must nbe used. I tried
=IF (A1 =
"*Catalog*", "Catalog", IF(A1 = "*Stock*", "Stock"))

A B
Stock - Rock Stock
Catalog - Indie Catalog
Catalog - Rock Catalog
Stock - Indie Stock

Thanks for your help.

Paul





Rajah

If function?
 
If you want to extract the leftmost part, before the dash, you might
try these two functions.

in B1:
=SEARCH(" - ", A1)

That puts a 6 in B1, which is the position of the dash.

in C1:
=LEFT(A1, B1)

That puts "Stock" in C1, which is the leftmost portion of A1 until the
dash.

(When you're happy with the first line, you should copy these to the
second and subsequent lines with the Fill Down command.)

You may also combine these into one nested function:
=LEFT(A1, SEARCH(" - ", A1))

The way you can find these nifty functions is clicking on the "fx"
probably above the "B" column header. You can enter a description of
what you're looking for or just pick the Text category.


Bob Phillips[_6_]

If function?
 
=IF(COUNTIF(A1,"*stock*"),"stock",IF("COUNTIF(A1," *catalog*"),"Catalog","Nei
ther"))


--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Paul" wrote in message
...
Thanks chips, but what happens with my other variable?

"Chip Pearson" wrote:

Try

=IF(COUNTIF(A1,"*stock*"),"stock","no stock")


"Paul" wrote in message
...
Newbie question...I'm looking for the formula that will report
the value that
I want in column B. I guess wildcards must nbe used. I tried
=IF (A1 =
"*Catalog*", "Catalog", IF(A1 = "*Stock*", "Stock"))

A B
Stock - Rock Stock
Catalog - Indie Catalog
Catalog - Rock Catalog
Stock - Indie Stock

Thanks for your help.

Paul








All times are GMT +1. The time now is 06:47 PM.

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