+ Reply to Thread
Results 1 to 4 of 4

Excel 2007 : Problem with 'left' and 'if' functions

  1. #1
    Registered User
    Join Date
    08-26-2011
    Location
    Kar, Pak
    MS-Off Ver
    2010:Home, 2007:Office
    Posts
    2

    Problem with 'left' and 'if' functions

    Hey all,

    I need to show some numbers (which are in billions) in a small table. The table is being fed from other sheets and when consolidated, the number shows up like 4.123456667E+11, while i just need to show the main rounded figure as 412.

    So i did a simple 'left(C17,3)' to get the proper figure, but the trouble was some numbers were in the tens of billions (41) while some were in the hundreds (411). For this I did a nestled 'if' function whereby the figure was rounded off to either two or three digits according to year
    {The data shows volumetric progression quarter-wise over the course of multiple years, here's the formula entered: =+IF($C$17=2008,LEFT(C19,2),IF($C$17=2009,LEFT(C19,2),IF($C$17=2010,LEFT(C19,3),IF($C$17=2011,LEFT(C19,3),)))) C17 cell has a drop down to select the year }

    Lo and behold, i ran into one last problem. 2008 has 1 quarter with the number in the tens of billions (41) while the remaining are in the hundreds (411) any suggestions on how to solve this?
    Attached Images Attached Images
    Last edited by taimur32; 08-27-2011 at 03:59 AM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,028

    Re: Problem with 'left' and 'if' functions

    Try this: =INT(C19/10^9)
    Never use Merged Cells in Excel

  3. #3
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Problem with 'left' and 'if' functions

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!

  4. #4
    Registered User
    Join Date
    08-26-2011
    Location
    Kar, Pak
    MS-Off Ver
    2010:Home, 2007:Office
    Posts
    2

    Re: Problem with 'left' and 'if' functions

    Quote Originally Posted by zbor View Post
    Try this: =INT(C19/10^9)
    It worked like a charm, thanks a lot bro.

    BTW guys that was my 1st post here, looking forward to asking many more questions, and helping wherever i can

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1