+ Reply to Thread
Results 1 to 6 of 6

A Problem with a formula Excel

  1. #1
    Forum Contributor
    Join Date
    01-18-2017
    Location
    Poznań, Poland
    MS-Off Ver
    2016
    Posts
    139

    A Problem with a formula Excel

    Hi all,

    I would like to ask you if you have a clue what might be the problem with the formula in Column G in the attached excel file.

    I created a formula in Excel 2016 which works just like it supposed to.

    But when I open this file in Excel 2013 (on two different computers) the formula works as long as I do not change a value in any cell in Column A then I got error #ARG!

    I do not even have to change any value. It shows me that error when I only enter a cell and press Enter without even changing any value.

    Is that a problem with Excel version? I did not use any function that was not available in previous Office version.

    I will appreciate any advice on that problem. Thank you in advance!
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: A Problem with a formula Excel

    Unable to open your file (Im at work), can you show the formula you are using?
    It may be that the formula is not available in earlier excel versions
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: A Problem with a formula Excel

    Hey Ford.
    On his Warehouse sheet he has this monster in CSE in E2.

    =IF(F2="Błędny format daty","Błędny format daty",IF(F2="","",IF(ROUND(MAX((All!$B$3:$B$1048576=Warehouse!A2)*(All!$G$3:$G$1048576)),0)=0,"Brak indeksu w arkuszu całość",IF(LEN(IF(LEN(F2)=7,VLOOKUP(LEFT(F2,2),'Raw data'!$F$2:$G$13,2,FALSE)&"."&F2,IF(LEN(F2)=10,F2,IF(LEN(F2)=5,VLOOKUP(LEFT(F2,2),'Raw data'!$F$2:$G$13,2,FALSE)&"."&F2,IF(LEN(F2)=9,LEFT(F2,5)&"."&RIGHT(F2,4),IF(LEN(F2)=6,LEFT(F2,2)&"."&MID(F2,3,2)&"."&MID(F2,5,4)))))))=8,LEFT(IF(LEN(F2)=7,VLOOKUP(LEFT(F2,2),'Raw data'!$F$2:$G$13,2,FALSE)&"."&F2,IF(LEN(F2)=10,F2,IF(LEN(F2)=5,VLOOKUP(LEFT(F2,2),'Raw data'!$F$2:$G$13,2,FALSE)&"."&F2,IF(LEN(F2)=9,LEFT(F2,5)&"."&RIGHT(F2,4),IF(LEN(F2)=6,LEFT(F2,2)&"."&MID(F2,3,2)&"."&MID(F2,5,4)))))),6)&"20"&RIGHT(IF(LEN(F2)=7,VLOOKUP(LEFT(F2,2),'Raw data'!$F$2:$G$13,2,FALSE)&"."&F2,IF(LEN(F2)=10,F2,IF(LEN(F2)=5,VLOOKUP(LEFT(F2,2),'Raw data'!$F$2:$G$13,2,FALSE)&"."&F2,IF(LEN(F2)=9,LEFT(F2,5)&"."&RIGHT(F2,4),IF(LEN(F2)=6,LEFT(F2,2)&"."&MID(F2,3,2)&"."&MID(F2,5,4)))))),2),IF(LEN(F2)=7,VLOOKUP(LEFT(F2,2),'Raw data'!$F$2:$G$13,2,FALSE)&"."&F2,IF(LEN(F2)=10,F2,IF(LEN(F2)=5,VLOOKUP(LEFT(F2,2),'Raw data'!$F$2:$G$13,2,FALSE)&"."&F2,IF(LEN(F2)=9,LEFT(F2,5)&"."&RIGHT(F2,4),IF(LEN(F2)=6,LEFT(F2,2)&"."&MID(F2,3,2)&"."&MID(F2,5,4)))))))-ROUND(MAX((All!$B$3:$B$7549=Warehouse!A2)*(All!$G$3:$G$7549)),0))))

    I'm not putting it in Formula brackets as it might be easier to read like the above.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: A Problem with a formula Excel

    Thanks Marvin

    I may have segmented that moster incorrectly, but it seems to me that you have some duplicate testing there.
    IF(LEN(F2)=7,VLOOKUP(LEFT(F2,2),'Raw data'!$F$2:$G$13,2,FALSE)&"."&F2,IF(LEN(F2)=10,F2,
    IF(LEN(F2)=5,VLOOKUP(LEFT(F2,2),'Raw data'!$F$2:$G$13,2,FALSE)&"."&F2,IF(LEN(F2)=9,LEFT(F2,5)&"."&RIGHT(F2,4),IF(LEN(F2)=6,LEFT(F2,2)&"."&MID(F2,3,2)&"."&MID(F2,5,4)))))))=8,LEFT(
    IF(LEN(F2)=7,VLOOKUP(LEFT(F2,2),'Raw data'!$F$2:$G$13,2,FALSE)&"."&F2,IF(LEN(F2)=10,F2,
    IF(LEN(F2)=5,VLOOKUP(LEFT(F2,2),'Raw data'!$F$2:$G$13,2,FALSE)&"."&F2,IF(LEN(F2)=9,LEFT(F2,5)&"."&RIGHT(F2,4),IF(LEN(F2)=6,LEFT(F2,2)&"."&MID(F2,3,2)&"."&MID(F2,5,4)))))),6)&"20"&RIGHT(
    IF(LEN(F2)=7,VLOOKUP(LEFT(F2,2),'Raw data'!$F$2:$G$13,2,FALSE)&"."&F2,IF(LEN(F2)=10,F2,
    IF(LEN(F2)=5,VLOOKUP(LEFT(F2,2),'Raw data'!$F$2:$G$13,2,FALSE)&"."&F2,IF(LEN(F2)=9,LEFT(F2,5)&"."&RIGHT(F2,4),IF(LEN(F2)=6,LEFT(F2,2)&"."&MID(F2,3,2)&"."&MID(F2,5,4)))))),2),
    IF(LEN(F2)=7,VLOOKUP(LEFT(F2,2),'Raw data'!$F$2:$G$13,2,FALSE)&"."&F2,IF(LEN(F2)=10,F2,
    IF(LEN(F2)=5,VLOOKUP(LEFT(F2,2),'Raw data'!$F$2:$G$13,2,FALSE)&"."&F2,IF(LEN(F2)=9,LEFT(F2,5)&"."&RIGHT(F2,4),IF(LEN(F2)=6,LEFT(F2,2)&"."&MID(F2,3,2)&"."&MID(F2,5,4)))))))-ROUND(MAX((All!$B$3:$B$7549=Warehouse!A2)*(All!$G$3:$G$7549)),0))))

    Also, based on what I can tell, it may simplify things of you used some helper cells. It looks like you reference F2 a lot, with all sorts of extracts and tests on it. Maybe if you used a helper and ID'd the LEN, and did a lot of the LEFT/MID/RIGHT in another helper, then just referenced those helpers?

  5. #5
    Forum Contributor
    Join Date
    01-18-2017
    Location
    Poznań, Poland
    MS-Off Ver
    2016
    Posts
    139

    Re: A Problem with a formula Excel

    Hi guys,

    thank you for the tips. I found the problem and it was a quite simple one - the date was in a different format since I opened the file in Windows 7 and created the formula in Windows 10.

    Nevertheless thanks for the support.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: A Problem with a formula Excel

    Thanks for the feedback, Im happy you got this resolved

+ 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. excel formula problem
    By DQMark4334 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 10-19-2018, 10:01 AM
  2. excel formula problem
    By arnab0711 in forum Excel General
    Replies: 1
    Last Post: 03-05-2012, 09:16 AM
  3. Formula problem in excel 03
    By dmfitter in forum Excel General
    Replies: 4
    Last Post: 01-04-2010, 11:09 AM
  4. [SOLVED] Problem with formula in Excel
    By Bill R in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 PM
  5. [SOLVED] Problem with formula in Excel
    By Bill R in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  6. Problem with formula in Excel
    By Bill R in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  7. Problem with formula in Excel
    By Bill R in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 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