+ Reply to Thread
Results 1 to 7 of 7

to correct a conversion merging formula taking cl but not litres

  1. #1
    Forum Contributor
    Join Date
    02-11-2014
    Location
    mauritius
    MS-Off Ver
    MS365
    Posts
    1,086

    to correct a conversion merging formula taking cl but not litres

    I have a worksheet which splits column K,l G,and merge them in column J

    However I have trouble with description of wines in which there are 37.5 cl ,and 75 cl but there is an additional conversion of 1L for wines , tried to add in the red line but did not work

    Can anyone assist should read 12*2*1L as per row 11which causing me trouble .

    My apologies here the link

    https://chandoo.org/forum/threads/to...-litres.38044/
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by JEAN1972; 04-02-2018 at 12:52 PM. Reason: link

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: to correct a conversion merging formula taking cl but not litres

    You have identified the problem. The formula stops here:

    =IF(LEFT(H11)="2",IF(I11="WINES",K11&"*"&L11&"*"&IF(ISNUMBER(FIND(37.5,G11)),"37.5CL","75CL"), ...

    If it does not find 37.5 in G11 (which it doesn't), it returns 75CL. So Excel can't go any further with it because it has found a match. You need to introduce another IF statement to deal with the 75CL requirement.

    This should resolve the issue with row 11 (but not other issues you have flagged in your attachment):

    Please Login or Register  to view this content.
    Last edited by AliGW; 04-02-2018 at 04:52 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: to correct a conversion merging formula taking cl but not litres

    Quote Originally Posted by AliGW View Post
    You have identified the problem. The formula stops here:

    =IF(LEFT(H11)="2",IF(I11="WINES",K11&"*"&L11&"*"&IF(ISNUMBER(FIND(37.5,G11)),"37.5CL","75CL"), ...
    I dont think it stops. FALSE of "WINES" ("SYRUP") will starts with green part:
    =IF(LEFT(H5)="2",IF(I5="WINES",K5&"*"&L5&"*"&IF(ISNUMBER(FIND(37.5,G5)),"37.5CL","75CL"),IF(U5="*",M5&"*"&LOOKUP(9^9,0+RIGHT(LEFT(G5,LOOKUP(9^9,FIND({25;30;33;50;70;75;100;"1L";"1.5L";"1L5";"2L"},G5))-2),{1,2,3}))&"*",K5&"*"&L5&"*")&LOOKUP(2,1/FIND({25;30;33;50;70;75;100;"1L";"1.5L";"1L5";"2L"},G5),{"25CL";"30CL";"33CL";"50CL";"70CL";"75CL";"100CL";"1L";"1.5L";"1.5L";"2L"})),"")

    The issue here I think is IF(U5="*",M5&"*"

    Any way, first part of formula should be:
    =IF(LEFT(H5)<>"2","",K4&"*"&L4*IF(I5="WINES",Unit of Wine,Unit of other liquid)
    Quang PT

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: to correct a conversion merging formula taking cl but not litres

    You are missing the point: for wines, it stops there, hence the problem.

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: to correct a conversion merging formula taking cl but not litres

    Quote Originally Posted by AliGW View Post
    You are missing the point: for wines, it stops there, hence the problem.
    Do you aggree with me:
    K5&"*"&L5&"*"&IF(ISNUMBER(FIND(37.5,G5)),"37.5CL","75CL") (1) is complete with IF statement?
    Next statement is FALSE_statement of IF(I5="WINE",(1),...)

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: to correct a conversion merging formula taking cl but not litres

    I said at the outset that the IF statement was complete if WINES are the category.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: to correct a conversion merging formula taking cl but not litres

    Rule 08: Cross-posting Without Telling Us

    Your post does not comply with Rule 8 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question. If you have fewer than 10 posts here, you will not be able to post a link, but you must still tell us where else you have asked the question.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).

    No further help to be offered, please, until the OP has complied with this request.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] merge existing if formula to convert cl to litres
    By JEAN1972 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-25-2017, 05:11 AM
  2. Replies: 6
    Last Post: 09-13-2017, 11:56 AM
  3. [SOLVED] formula to convert ml to litres automatically to a specific column
    By JEAN1972 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-21-2017, 11:10 AM
  4. Merging the correct number of cell rows to fit a string of wrapped text
    By iterature in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-28-2007, 02:15 PM
  5. [SOLVED] Excel Formula for "Litres per 100 Km"
    By Expara in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-07-2006, 01:25 PM
  6. Excel Formula for "Litres per 100 Km"
    By Expara in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-07-2006, 11:45 AM

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