Excel Question - Joining two cells
I'm trying to join two cells that have the top and bottom EBITDA multiples into one cell that will show the range:
So for example, if cell A1 is showing 7.0x and cell A2 is showing 8.0x, I want cell A3 to show 7.0x - 8.0x.
I've tried using =A1&"x - "&A2&"x", but I can't get the .0 zeros to show after the numbers 7 and 8.
Can someone help please?
Thanks
Just put a .0 in front of the x in the quotation marks. Formula will read like this: =A1&".0x - "&B1&".0x"
How would you write an exception handler for let's say mult of 7.1 and 8.1?
.
In the case of 7.1 to 8.1, the original formula would work because the cell the formula is looking into is showing a 7.1. With 7.0x, the number in the cell is 7, which is why the output is 7x rather than 7.0x.
Right, but was asking how it would handle dynamically, i.e. a formula that could show that output with either #.0x or #.1x as input as so one wouldn't have to change for each case. Monkeyed around with an +IF(ISERROR(...)) but no such luck.
You can use the MOD function (returns the remainder after a number is divided by a specific divisor), like this:
=IF(MOD(A1,1)=0,A1&".0x - "&A2&".0x",A1&"x - "&A2&"x")
This obviously only checks the first multiple in A1, and you have to nest some more if statements to do the whole thing, but this should work. Sorry I was too lazy to make the full statement haha
=CONCATENATE(TEXT(A1,"0.0x"),"-",TEXT(B1,"0.0x"))
Done.
Oh that haha, well done & thanks
Yea, so mine's not nearly as elegant as Flakes. Don't use mine ha.
3
Ipsum asperiores totam nesciunt error sunt ipsam impedit. Minus quia pariatur nemo doloremque itaque. Eaque sunt perspiciatis repellat officiis consectetur. Voluptate aut quia deserunt et.
See All Comments - 100% Free
WSO depends on everyone being able to pitch in when they know something. Unlock with your email and get bonus: 6 financial modeling lessons free ($199 value)
or Unlock with your social account...