Results 1 to 2 of 2

Write Excel formulas into VBA code

Threaded View

  1. #1
    Forum Contributor
    Join Date
    04-03-2014
    Location
    Berlin
    MS-Off Ver
    Excel 2010
    Posts
    160

    Write Excel formulas into VBA code

    Hi Guys,

    I am trying to write some formulas into a VBA code but as my beginner knowledge does not suffice, the result does not do the Job.
    Here are the formulas:

    =IF(COUNTIFS([Material];[@Material];[Werk];60)>0;TRUE();FALSE())

    =IF(SUM(SUMIFS([Preis aus IDoc];[Material];[@Material];[W];"L");SUMIFS([Preis aus IDoc];[Material];[@Material];[W];"K")*(-1))>0;TRUE();FALSE())

    =IFERROR(((SUMIFS([Preis aus IDoc];[Material];[@Material];[W];"L")-SUMIFS([Preis aus IDoc];[Material];[@Material];[W];"K"))/SUMIFS([Preis aus IDoc];[Material];[@Material];[W];"L")*(100))<=50;FALSE())

    =IF(ISBLANK([@Material]);"";IF(AND([@[Prüfung Werk 60]];[@[Prüfung Wert]]);"keine Fehler";IF(AND([@[Prüfung Werk 60]];[@[Prüfung Wert]]=FALSE());"Preis < Kosten";IF(AND([@[Prüfung Werk 60]]=FALSE();[@[Prüfung Wert]]);"W60 fehlt"; "W60 fehlt & Preis < Kosten"))))

    =IF(SUM(SUMIFS([Preis aus IDoc];[Material];[@Material];[W];"L");SUMIFS([Preis aus IDoc];[Material];[@Material];[W];"K")*(-1))<0;SUMIFS([Preis aus IDoc];[Material];[@Material];[W];"L")-SUMIFS([Preis aus IDoc];[Material];[@Material];[W];"K");"")

    I have enclosed the Excel file, the formulas that I am trying to write in the code are in columns J, K, L, M, N.
    If you could give me a hand with that it would be awesome ;-)

    Many thanks!
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Write Excel formulas in VBA code
    By vio.coman in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-16-2015, 10:56 AM
  2. Error in code to write formulas into cells
    By kylecodesinBoston in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-07-2015, 02:24 PM
  3. Need help to write vba code in excel to do the below ASAP
    By ohadshay in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-29-2013, 05:40 PM
  4. [SOLVED] Should I copy text, use formulas or write VBA Code
    By Decar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-27-2013, 12:19 PM
  5. Excel closes when using VBA to write VBA code
    By btoback in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-04-2007, 03:42 PM
  6. write excel formulas
    By bc in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-02-2005, 06:17 PM
  7. how to write formulas in excel for money to days
    By wolfmasterr in forum Excel - New Users/Basics
    Replies: 8
    Last Post: 06-01-2005, 07:05 PM

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