If Formula Begins With

tcnt9176

Board Regular
Joined
Jun 23, 2008
Messages
223
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.
 
Upvote 0
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:
Upvote 0

Forum statistics

Threads
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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top