![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Posts: 91
|
My problem is such i have an entry in a colum "2690 - L 6MT1 REG" i want to be able to compare the first 4 digits with a number in another colum and return the value true or false depending on wither they are matched.
|
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
Substitute the true range in B for B:B. Aladin |
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Location: =ActiveCell.Address
Posts: 478
|
This should do the trick
=IF(LEFT(A1,4)+0=C1,TRUE) The LEFT(A1,4) extracts the first four characters. The +0, converts it to number format (LEFT produces text by default) C1 is where I put the four digit value by itself Then there's just a bog standard IF around it. Rgds AJ |
|
|
|
|
|
#4 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
Hi
How about =IF(COUNTIF($C$1:$C$600,LEFT(A1,4)),TRUE) |
|
|
|
|
|
#5 |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Or, indeed, with COUNTIF:
=COUNTIF(B:B,LEFT(A1,4)+0)>0 Aladin [ This Message was edited by: Aladin Akyurek on 2002-03-26 04:18 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|