0

I'm trying to use this formula to determine if Column A is a multiple of 5, but the arrayformula isn't expanding.

=ARRAYFORMULA(IF(GCD(5,A1:A)=5,TRUE,FALSE))

GCD doesn't seem to support arrayformula. How to make it work with ARRAYFORMULA?

Column C is the result of using autofill.

A B[Arrayformula] C[DragFill]
1 FALSE FALSE
2 FALSE
3 FALSE
4 FALSE
5 TRUE
6 FALSE
7 FALSE
8 FALSE
9 FALSE
10 TRUE
62 FALSE
34 FALSE
22 FALSE
75 TRUE
34 FALSE
46 FALSE
30 TRUE
21 FALSE
92 FALSE
56 FALSE
TheMaster
  • 45,448
  • 6
  • 62
  • 85
watchman
  • 11
  • 3
  • Do NOT share [spreadsheets](//meta.stackoverflow.com/a/260455)/[images](//meta.stackoverflow.com/q/285551) as the only source of data. Make sure to add input and expected output as **plain text table** to the question. [Click here](//webapps.stackexchange.com/a/161855) to create a table easily. Adding such tables makes **it is easier to copy/paste**. Your question may be closed, if it isn't self contained. Your table should be a minimal example.[Your email address can also be accessed by the public](//meta.stackoverflow.com/q/394304), if you share Google files. – TheMaster Oct 31 '22 at 07:29

1 Answers1

2

try:

=BYROW(A1:A20, LAMBDA(x, GCD(5, x)=5))

enter image description here

or just:

=INDEX(MOD(A1:A20, 5)=0)

enter image description here

player0
  • 124,011
  • 12
  • 67
  • 124