Home > Blockchain >  My formula creates a header and pastes the value underneath. How do I make this one cell?
My formula creates a header and pastes the value underneath. How do I make this one cell?

Time:01-29

This is the formula I am using:

=QUERY(Income!D2:D48, "select sum(D)/10*3")

For some reason it creates the header shown in the image below and posts the formula's result beneath it.

(https://i.stack.imgur.com/Ya9WJ.png)

**How do I make this one cell?? ** I tried writing out the formula as normal and expected the number to fill the same cell as the formula.

Instead, the formula has pasted the result in the cell below

CodePudding user response:

There are two ways:

Inside the QUERY add at the end label SUM(D)/10*3 ''

=QUERY(Income!D2:D48, "select sum(D)/10*3 LABEL sum(D)/10*3 ''")

Or just use that range as the input of SUM:

=SUM(Income!D2:D48)/10*3

CodePudding user response:

You could do:

=QUERY(Income!D2:D48, "select sum(D)/10*3 label sum(D)/10*3 ''")

Or:

=QUERY(QUERY(Income!D2:D48, "select sum(D)/10*3"),"offset 1",)

Or:

=INDEX(QUERY(Income!D2:D48, "select sum(D)/10*3"),2)

But you can simply use the SUM function.

=SUM(Income!D2:D48)/10*3
  • Related