3

I'm using Google Spreadsheets and I'm currently trying to get multiple functions to output into 1 square. In my example:

={IF((B2-D2)>=0,"+"), SUM(B2-D2)}

I get the output I want +7, but it's in 2 different grid boxes | + | 7 |. How can I get both functions to output into the same box?

And this is just an example, so don't get hung-up on alternative workarounds

Google Spreadsheets Example

  • 1
    No alternative workarounds, right. But from your question, it looks like you are trying to do thing overly complicated. You will end up with a string in the result cell, which is often not what I'd want in the end. You know that example could be solved with formatting, right? – Vidar S. Ramdal Oct 2 '15 at 9:43
  • @Vidar - I actually didn't know that. And, just curios, why do you consider strings bad? – CSS Apprentice Oct 2 '15 at 12:37
  • 1
    @CSSApprentice You cannot do calculations (like =SUM) on strings (without converting them back to numbers). – Vidar S. Ramdal Oct 2 '15 at 12:38
5

Then you have to use this formula:

=IF(B2-D2 >= 0, "+" & SUM(B2-D2))

The curly brackets are used for embedded arrays

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.