lundi 30 décembre 2019

Google Sheets sparkline, with importrange, with condition am I able to do this?

So I have two google sheets books. Book1 and Book2.

I currently have Book1 importing some info off Book2 to create a small sparkline graph. It's pulling information from Book2 column A3 through G3 to create a small graph.

My current code is (in a Book1 cell)

=SPARKLINE(IMPORTRANGE("Book2","Sheet1!A3:G3"), 
{"charttype","bar";"max",100;"color1","Green";"color2","red"})

However, I'd like this sparkline and importrange only to work IF a condition on Book1 is met.

So in Book1 if a cell has a condition (example) TRUE, then the formula above (which is in another cell in Book1) would apply and it would go ahead and import from Book2 and create the graph in Book1.

I'm not sure how to make a condition on my formula. I've tried IF statements without success. Hoping somebody out there could teach me something today.

Aucun commentaire:

Enregistrer un commentaire