liamlarmour
New Member
- Joined
- May 4, 2017
- Messages
- 4
Hi
I'm trying to create a formula to deliver three different outputs based on conditions of three columns.
Conditions:
IF a2 = 11 AND d2 = 028 return NI Landline OR
IF a2 = 11 AND c2 = 07 return Mobile OR
IF a2 <>11 return Other Number
It;s necessary to check Col C for 028 to verify it's a NI Landline, and Col B for 07 to verify it's a UK mobile number - both will have 11 digits. Those that don't have 11 digits are likely to be incorrectly formatted numbers or non NI/-UK numbers.
[TABLE="width: 406"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Column[/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]Row[/TD]
[TD]Number of Digits[/TD]
[TD]First Two [/TD]
[TD]First Three[/TD]
[TD]Number Type[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]11[/TD]
[TD]02[/TD]
[TD]028[/TD]
[TD]NI Landline[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]11[/TD]
[TD]07[/TD]
[TD]077[/TD]
[TD]Mobile[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]13[/TD]
[TD]26[/TD]
[TD]269[/TD]
[TD]Other Number[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]11[/TD]
[TD]02[/TD]
[TD]028[/TD]
[TD]NI Landline[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]11[/TD]
[TD]02[/TD]
[TD]028[/TD]
[TD]NI Landline[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]11[/TD]
[TD]07[/TD]
[TD]077[/TD]
[TD]Mobile[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]11[/TD]
[TD]02[/TD]
[TD]028[/TD]
[TD]NI Landline[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]11[/TD]
[TD]07[/TD]
[TD]079[/TD]
[TD]Mobile[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]11[/TD]
[TD]07[/TD]
[TD]077[/TD]
[TD]Mobile[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]11[/TD]
[TD]02[/TD]
[TD]028[/TD]
[TD]NI Landline[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]11[/TD]
[TD]07[/TD]
[TD]077[/TD]
[TD]Mobile[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]11[/TD]
[TD]02[/TD]
[TD]028[/TD]
[TD]NI Landline[/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]11[/TD]
[TD]02[/TD]
[TD]028[/TD]
[TD]NI Landline[/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD]11[/TD]
[TD]02[/TD]
[TD]028[/TD]
[TD]NI Landline[/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD]11[/TD]
[TD]02[/TD]
[TD]028[/TD]
[TD]NI Landline[/TD]
[/TR]
[TR]
[TD]16[/TD]
[TD]11[/TD]
[TD]07[/TD]
[TD]078[/TD]
[TD]Mobile[/TD]
[/TR]
</tbody>[/TABLE]
I tried the below formula but it only returns Other Number for all rows:
IF((AND(G2="11",I2="028")),"NI Landline",IF((AND(G2="11",H2="07")),"Mobile","Other Number"))
I guess I am doing something obviously wrong that I'll hit myself once it's pointed out to me, but I would be grateful for any advice.
Thanks
Liam
I'm trying to create a formula to deliver three different outputs based on conditions of three columns.
Conditions:
IF a2 = 11 AND d2 = 028 return NI Landline OR
IF a2 = 11 AND c2 = 07 return Mobile OR
IF a2 <>11 return Other Number
It;s necessary to check Col C for 028 to verify it's a NI Landline, and Col B for 07 to verify it's a UK mobile number - both will have 11 digits. Those that don't have 11 digits are likely to be incorrectly formatted numbers or non NI/-UK numbers.
[TABLE="width: 406"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Column[/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]Row[/TD]
[TD]Number of Digits[/TD]
[TD]First Two [/TD]
[TD]First Three[/TD]
[TD]Number Type[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]11[/TD]
[TD]02[/TD]
[TD]028[/TD]
[TD]NI Landline[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]11[/TD]
[TD]07[/TD]
[TD]077[/TD]
[TD]Mobile[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]13[/TD]
[TD]26[/TD]
[TD]269[/TD]
[TD]Other Number[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]11[/TD]
[TD]02[/TD]
[TD]028[/TD]
[TD]NI Landline[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]11[/TD]
[TD]02[/TD]
[TD]028[/TD]
[TD]NI Landline[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]11[/TD]
[TD]07[/TD]
[TD]077[/TD]
[TD]Mobile[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]11[/TD]
[TD]02[/TD]
[TD]028[/TD]
[TD]NI Landline[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]11[/TD]
[TD]07[/TD]
[TD]079[/TD]
[TD]Mobile[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]11[/TD]
[TD]07[/TD]
[TD]077[/TD]
[TD]Mobile[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]11[/TD]
[TD]02[/TD]
[TD]028[/TD]
[TD]NI Landline[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]11[/TD]
[TD]07[/TD]
[TD]077[/TD]
[TD]Mobile[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]11[/TD]
[TD]02[/TD]
[TD]028[/TD]
[TD]NI Landline[/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]11[/TD]
[TD]02[/TD]
[TD]028[/TD]
[TD]NI Landline[/TD]
[/TR]
[TR]
[TD]14[/TD]
[TD]11[/TD]
[TD]02[/TD]
[TD]028[/TD]
[TD]NI Landline[/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD]11[/TD]
[TD]02[/TD]
[TD]028[/TD]
[TD]NI Landline[/TD]
[/TR]
[TR]
[TD]16[/TD]
[TD]11[/TD]
[TD]07[/TD]
[TD]078[/TD]
[TD]Mobile[/TD]
[/TR]
</tbody>[/TABLE]
I tried the below formula but it only returns Other Number for all rows:
IF((AND(G2="11",I2="028")),"NI Landline",IF((AND(G2="11",H2="07")),"Mobile","Other Number"))
I guess I am doing something obviously wrong that I'll hit myself once it's pointed out to me, but I would be grateful for any advice.
Thanks
Liam