Dec 27 2022 01:45 AM - edited Dec 27 2022 01:46 AM
Need Help
We have Columns contains numeric value , I need Excel Formula to copy the same cell if only the Digit Number 9 & 8 from right to left equal (50, 52, 54, 55, 56 or 58), other wise return Null. Below sample of the data and Expected Values
The Data | Expected Values |
777797247379 | Null |
777483910509 | Null |
777984179917 | Null |
777505626795 | 777505626795 |
777185360938 | Null |
777501884978 | 777501884978 |
777562393745 | 777562393745 |
777882465989 | Null |
777223529392 | Null |
777585172285 | 777585172285 |
7770 4982152 | Null |
777554567499 | 777554567499 |
777145024522 | Null |
777235624042 | Null |
777663870157 | Null |
777504422934 | 777504422934 |
777799635466 | Null |
777866791186 | Null |
777585726099 | 777585726099 |
Dec 28 2022 12:43 AM
Solutionin C2 one way:
=IF(ISNUMBER(MATCH(IFERROR(MID(A2,LEN(A2)-8,2),""),{"50","52","54","55","56","58"},0)),A2,"")
Dec 28 2022 03:59 AM
Dec 28 2022 04:37 AM - edited Dec 28 2022 11:21 PM
To dynamically assess any sized data set, try:
=LET(DATA,A1:A19,
IF(MMULT(--(--MID(DATA,LEN(DATA)-8,2)={50,52,54,55,56,58}),SEQUENCE(6)),
DATA,"Null"))
Replace A1:A19 with your dataset range.
Dec 28 2022 06:04 AM
Alternatively with 2021 or 365:
=IF(ISNUMBER(XMATCH(MID(A1:A19,LEN(A1:A19)-8,2),{"50","52","54","55","56","58"})), A1:A19, "null")
Hi @MY (^0 isn't required in your nice MMULT option)
Dec 28 2022 11:42 AM
Dec 28 2022 07:54 PM
Dec 28 2022 09:12 PM
Dec 28 2022 09:20 PM
Dec 28 2022 11:52 PM
=LET(DATA,A1:A19,
IF(MMULT(--(--MID(DATA,LEN(DATA)-8,2)={50,52,54,55,56,58}),SEQUENCE(6)),
DATA,"Null"))
So if we digest it in parts:
This is a mathematical outlook on solving this problem so I highly suggest replicating steps 2 to 8 separately (replace DATA with A1:A19 for steps 2 to 7) to understand what's happening at each step.
Hopefully this helps.
Dec 29 2022 01:41 AM