+ Reply to Thread
Results 1 to 10 of 10

Improve IF formula

  1. #1
    Registered User
    Join Date
    02-03-2015
    Location
    Larvik, Norway
    MS-Off Ver
    Office MAC 2011
    Posts
    43

    Improve IF formula

    I´m making a large document to register workdays and holidays from work .

    Using the IF formula but must use many IF formula since I do not get to collect more cells in a formula

    NORWEGIAN TRANSLATE: HVIS = IF


    =(HVIS(Registrering!AE36="RA";HVIS(Registrering!AF36="T";Kode!B4))+(HVIS(Registrering!AE37="RA";HVIS(Registrering!AF37="T";Kode!B4))+(HVIS(Registrering!AE38="RA";HVIS(Registrering!AF38="T";Kode!B4))+(HVIS(Registrering!AE39="RA";HVIS(Registrering!AF39="T";Kode!B4))+(HVIS(Registrering!AE40="RA";HVIS(Registrering!AF40="T";Kode!B4))+(HVIS(Registrering!AE41="RA";HVIS(Registrering!AF41="T";Kode!B4))+(HVIS(Registrering!AE42="RA";HVIS(Registrering!AF42="T";Kode!B4))+(HVIS(Registrering!AE43="RA";HVIS(Registrering!AF43="T";Kode!B4))))))))))

    can anyone help me?

    I was hoping for this: =HVIS(Registrering!AE36:Registrering!AE43="RA";HVIS(Registrering!AF36:Registrering!AF43="T";Kode!B4)
    But this does not work

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Improve IF formula

    Try

    =IF(COUNTIFS(Registrering!AE36:AE43;"RA";Registrering!AF36:AF43;"T")>0;Kode!B4;"")

  3. #3
    Registered User
    Join Date
    02-03-2015
    Location
    Larvik, Norway
    MS-Off Ver
    Office MAC 2011
    Posts
    43

    Re: Improve IF formula

    Hi

    Thanks! That works great!

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Improve IF formula

    You're welcome.

  5. #5
    Registered User
    Join Date
    02-03-2015
    Location
    Larvik, Norway
    MS-Off Ver
    Office MAC 2011
    Posts
    43

    Re: Improve IF formula

    Hi

    Now I´m Trying to do this
    =HVIS(ANTALL.HVIS.SETT(Registrering!C23:C30;Registrering!C36:C43;Registrering!C49:C56;"RA";Registrering!D23:D30;Registrering!D36:D43;Registrering!D49:D56;"T")>0;Kode!B4)

    But this dosen´t work. Any sugestion?

    =HVIS(ANTALL.HVIS.SETT is =IF(COUNTIFS

    Thanks

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Improve IF formula

    What is in the 'Between' cells (C31 to C35, C44 to C48, etc..) ?

    If those cells will NOT contain the "RA" (likewise for "T" in the D rows),
    You can just do
    =HVIS(ANTALL.HVIS.SETT(Registrering!C23:C56;"RA";Registrering!D23:D56;"T")>0;Kode!B4)

  7. #7
    Registered User
    Join Date
    02-03-2015
    Location
    Larvik, Norway
    MS-Off Ver
    Office MAC 2011
    Posts
    43

    Re: Improve IF formula

    I can do that. But it wil only register one RA and on T

    So if I put RA in C23 and T in D23 it wil not register the RA in C235 and T in D235.....

  8. #8
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Improve IF formula

    Wait, is Kode!B4 a numeric value?

    Try
    =ANTALL.HVIS.SETT(Registrering!C23:C56;"RA";Registrering!D23:D56;"T")*Kode!B4

  9. #9
    Registered User
    Join Date
    02-03-2015
    Location
    Larvik, Norway
    MS-Off Ver
    Office MAC 2011
    Posts
    43

    Re: Improve IF formula

    Yeah it´s numeric value, sry for not saying.

    But the new formula works! Thanks!

  10. #10
    Registered User
    Join Date
    02-03-2015
    Location
    Larvik, Norway
    MS-Off Ver
    Office MAC 2011
    Posts
    43

    Re: Improve IF formula

    And if the value is a date?
    Registrering!E112 = 13.july
    Registrering!AB112 = 7 august
    Registrering!AX112 = 9 sep

    Formula inn cell Z11
    =ANTALL.HVIS.SETT(Registrering!E10:E368;"RA";Registrering!F10:F368;"T");Registrering!E112) ?

    And I will have all the dates in cell Z11, so I would like to bee like this inn cell Z11 "13.july - 7 august - 9 sep"

    Do you know Thanks for all your help.

+ 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. Improve/Shorten IF Formula
    By Saint02 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-02-2010, 09:20 PM
  2. Can anyone please improve my formula?
    By B00105904 in forum Excel General
    Replies: 11
    Last Post: 06-29-2010, 11:55 AM
  3. improve formula offset and indirect
    By Biff in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 04:05 AM
  4. improve formula offset and indirect
    By John Contact in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  5. [SOLVED] How can improve this formula?
    By Metallo in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-27-2005, 02:06 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