![]() |
using wildcard for vlookup?
I have a worksheet with a field I'll call function code (FC). I want to
populate a field in each row depending on what the FC is. Example, I want this new field to be 10 if the FC begins with "40", 20 if it begins with "412", 30 if it begins with "42" but not "423". Is this possible? Maybe with a vba routine? |
using wildcard for vlookup?
One way:
=IF(LEFT(fc,2)="40",10,IF(LEFT(fc,3)="412",20,IF(L EFT(fc,3)="423","",IF(LEFT(fc,2)="42",30,"")))) -- Biff Microsoft Excel MVP "Steve" wrote in message ... I have a worksheet with a field I'll call function code (FC). I want to populate a field in each row depending on what the FC is. Example, I want this new field to be 10 if the FC begins with "40", 20 if it begins with "412", 30 if it begins with "42" but not "423". Is this possible? Maybe with a vba routine? |
All times are GMT +1. The time now is 12:30 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com