+ Reply to Thread
Results 1 to 8 of 8

How can I copy the formula result formatting?

  1. #1
    Registered User
    Join Date
    01-11-2010
    Location
    Elkton, MD
    MS-Off Ver
    Excel 2003
    Posts
    3

    Question How can I copy the formula result formatting?

    How can I get the formula result in the correct custom format instead of doing each one individually? C4 & H4 are country and product, column 8 is sales quantity.

    Formula on sheet 1:
    =IF(COUNTIF('Sheet 2'!$A$53:$Z$5000,C4&H4), VLOOKUP(C4&H4,'Sheet 2'!$A$53:$Z$5000,8,0)," ")

    Sample of column 8
    0.384 kg
    0.128 kg
    0.165 kg
    1.189 EA
    0.171 L
    0.356 EA
    9.180 kg
    2.225 L
    6.182 kg
    341.667 L

    Help is appreciated!

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: How can I copy the formula result formatting?

    If the units are in the lookup table as a result of custom formatting in those cells, you can't (without VBA).

    You could put the units in a separate column of the lookup table and retrieve them with a second VLOOKUP.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    01-11-2010
    Location
    Elkton, MD
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: How can I copy the formula result formatting?

    The units are the result of a BW query from SAP.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: How can I copy the formula result formatting?

    Then I guess I'm missing the question. The lookup will return exactly what's in the cells, which is text.

  5. #5
    Registered User
    Join Date
    01-11-2010
    Location
    Elkton, MD
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: How can I copy the formula result formatting?

    the query result is just the number, but it is formatted for the quantity. Sounds like this is a query problem, nothing that can be resolved by the formula?

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: How can I copy the formula result formatting?

    Still clueless as to what the data actually looks like. Can you post an example workbook?

  7. #7
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: How can I copy the formula result formatting?

    Hi M Neff,

    Welcome to the forum!

    shg had it right in his first response. SAP BW/BI adds the units of measure as formatting in each cell. You won't be able to bring this through a formula without VBA.

    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: How can I copy the formula result formatting?

    SAP BW/BI adds the units of measure as formatting in each cell
    Thank you, CXL.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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