Dabbler_13579
New Member
- Joined
- Jul 26, 2014
- Messages
- 3
Hello. I'm working with a spreadsheet where my data has some formatting constraints. Because of this, I'm trying to work with some ranges that are discontinuous. Now functions like FREQUENCY and SMALL don't mind if I feed them a defined name like RANGE_01=A1:B2,A4:B5. SMALL(RANGE_01,1) works just fine, but if I try to do COUNTIF(RANGE_01,0) I get a #VALUE error. I tried splitting RANGE_01 up into RANGE_02=A1:B2 and RANGE_03=A4:B5 then doing COUNTIF(RANGE_02:RANGE_03,0), but this works out as COUNTIF(A1:B5,0). So far the only work-arounds I've figured out are to do COUNTIF(RANGE_02,0)+COUNTIF(RANGE_03,0) (except repeated many times because my actual range has more than two parts) or copying A1:B2 to C1:D2 and A4:B5 to C3:D4 and doing COUNTIF(C1:D4,0). I don't like the first one because it's a pain in the butt and a lot of typing. I don't like the second one because it's inelegant-I feel like there is or should be a way to do this without using those extra cells. Can anyone give me some ideas? I saw something about using INDIRECT to work around this, but I couldn't figure it out. Thanks!