Dear StackOverFlow users,
I would love to create a function that will do the calculation based on the specific value in another column.
Example xls is here:
https://docs.google.com/spreadsheets/d/1y6d0_0x_8aooy9iYfc9HtspwBpN6k5mJV5TKeOsnjcQ/edit?usp=sharing
CodePudding user response:
use IF
:
=IF(C3="Dividend"; SUBSTITUTE(
IMPORTXML("https://finviz.com/quote.ashx?t="&A3; 'XML IMPORT'!C$3); "."; ",")/4; "-")
array would be:
={"DIVIDEND";INDEX(MAP(C2:C; A2:A; LAMBDA(c; a; IF(c="Dividend"; SUBSTITUTE(
IMPORTXML("https://finviz.com/quote.ashx?t="&a; 'XML IMPORT'!C$3); "."; ",")/4; "-"))))}