# If Formula Begins With

#### tcnt9176

##### Board Regular
Can anyone tell me why the result is always false even when it should be true? It works if I change it to exact but begins with does not work.

Code:
``````    Range("B2").FormulaR1C1 = _
"=IF(RC[6]=""FromRAM*"",VLOOKUP(C[-1],'[Bump Information.xls]CQS Assignments'!C1:C2,2,FALSE),false)"``````

### Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
You cannot write an IF formula like that. You would need to do:

Code:
``````Range("B2").FormulaR1C1 = _
"=IF(left(RC[6],7)=""FromRAM"",VLOOKUP(C[-1],'[Bump Information.xls]CQS Assignments'!C1:C2,2,FALSE),false)"``````
Hope that helps.

try
Code:
``    Range("B2").FormulaR1C1 = "=IF(LEFT(RC[6],7)=""FromRAM"",VLOOKUP(C[-1],'[Bump Information.xls]CQS Assignments'!C1:C2,2,FALSE),FALSE)"``
or even
Code:
``    Range("B2").FormulaR1C1 =  "=IF(LEFT(RC[6],7)=""FromRAM"",VLOOKUP([B]RC[-1][/B],'[Bump Information.xls]CQS  Assignments'!C1:C2,2,FALSE),FALSE)"``

Last edited:
Thanks!! That worked perfectly!!!

Replies
4
Views
606
Replies
0
Views
127
Replies
1
Views
487
Replies
0
Views
330
Replies
3
Views
189

### Forum statistics

1,203,728
Messages
6,056,997
Members
444,902
Latest member
ExerciseInFutility

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