m_in_spain
Board Regular
- Joined
- Sep 28, 2018
- Messages
- 72
- Office Version
- 365
- Platform
- Windows
Hi (again)
I am sure this is something to do with array or range, but i cannot get my head around it.
There must be a simpler way to express the "if(or(" part of the following formula (in red).
=IF(qcountry=CA1,1,IF(OR(qcountry=CA2,qcountry=CA60,qcountry=CA81),3,IF(OR(qcountry=CA5,qcountry=CA6,qcountry=CA7,qcountry=CA8,qcountry=CA9,qcountry=CA10,qcountry=CA11,qcountry=CA12,qcountry=CA13,qcountry=CA14,qcountry=CA15,qcountry=CA16,qcountry=CA17,qcountry=CA18,qcountry=CA19,qcountry=CA20,qcountry=CA21,qcountry=CA22,qcountry=CA23,qcountry=CA24,qcountry=CA25,qcountry=CA26,qcountry=CA27,qcountry=CA28,qcountry=CA29,qcountry=CA30,qcountry=CA31,qcountry=CA32,qcountry=CA33,qcountry=CA34,qcountry=CA35,qcountry=CA36,qcountry=CA37,qcountry=CA38,qcountry=CA39,qcountry=CA40,qcountry=CA41,qcountry=CA42,qcountry=CA43,qcountry=CA44,qcountry=CA45,qcountry=CA46,qcountry=CA47),2,4)))
it is just a consecutive list from CA5 to CA47 This works but it is cumbersome
any help will be much appreciated,
TIA
I am sure this is something to do with array or range, but i cannot get my head around it.
There must be a simpler way to express the "if(or(" part of the following formula (in red).
=IF(qcountry=CA1,1,IF(OR(qcountry=CA2,qcountry=CA60,qcountry=CA81),3,IF(OR(qcountry=CA5,qcountry=CA6,qcountry=CA7,qcountry=CA8,qcountry=CA9,qcountry=CA10,qcountry=CA11,qcountry=CA12,qcountry=CA13,qcountry=CA14,qcountry=CA15,qcountry=CA16,qcountry=CA17,qcountry=CA18,qcountry=CA19,qcountry=CA20,qcountry=CA21,qcountry=CA22,qcountry=CA23,qcountry=CA24,qcountry=CA25,qcountry=CA26,qcountry=CA27,qcountry=CA28,qcountry=CA29,qcountry=CA30,qcountry=CA31,qcountry=CA32,qcountry=CA33,qcountry=CA34,qcountry=CA35,qcountry=CA36,qcountry=CA37,qcountry=CA38,qcountry=CA39,qcountry=CA40,qcountry=CA41,qcountry=CA42,qcountry=CA43,qcountry=CA44,qcountry=CA45,qcountry=CA46,qcountry=CA47),2,4)))
it is just a consecutive list from CA5 to CA47 This works but it is cumbersome
any help will be much appreciated,
TIA