# 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

Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

#### 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 />

#### kidwispa

##### Active Member
Thanks

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,168,030
Messages
5,856,935
Members
431,841
Latest member
jaybeem

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back