# Formula help!

#### kidwispa

##### Active Member
Hi all,

I'm trying to get this IF formula to work whereby if the username (column H) is one of two specific names AND the Channel (column I) begins with the letter C, then to return the value "Commercial", otherwise vlookup the results from a list of others.

I came up with this:

=IF(AND(OR(H2="name1",H2="name2")*('Credit Data'!I2="C*")),"Commercial",VLOOKUP('Credit Data'!H2,Lookup!\$G\$23:\$H\$54,2,0))

Is the C* bit incorrect because the rest of the formula seems to work???

Thanks for any help!

### Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

#### MrKowz

##### Well-known Member
Try:

<table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #A6AAB6"><thead><tr style=" background-color: #E0E0F0;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120"></th><td style="text-align:left">=IF(<font color="Blue">AND(<font color="Red">OR(<font color="Green">H2="name1",H2="name2"</font>),LEFT(<font color="Green">'Credit Data'!I2,1</font>)="C"</font>),"Commercial",VLOOKUP(<font color="Red">'Credit Data'!H2,Lookup!\$G\$23:\$H\$54,2,0</font>)</font>)</td></tr></tbody></table></td></tr></table><br />

Thanks

Replies
3
Views
71
Replies
13
Views
168
Replies
8
Views
35
Replies
3
Views
46
Replies
5
Views
35