Announcement

Collapse
No announcement yet.

MORE EXCEL GURU HELP! (not bike related)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • MORE EXCEL GURU HELP! (not bike related)

    Fanks for the last one, now I need one more:

    If A1 is greater than A2 and A2 is greater than zero then A2 HOWEVER If A1 is less than A2 but A1 is greater than zero then A1

    Anyone? :?

    So on the eight day, after wasting time faffing about with unimportant guff like heaven & earth & the waters & sky & creatures [& having a wee kip] & man.... God created PSB (GenesiSX-R1000)

  • #2
    Ok, I'm assuming you want the answer in A3.

    Not sure of the syntax of VBA in this instance but it will be very similar

    ok - now for the code

    if A1 > A2 and A2 > 0 then
    A3 = A2
    elif A1 < A2 and A1 > 0
    A3 = A1


    I'll keep you posted.
    www.alertmotorcycleschool.com

    7 Cossom Place
    BAYSWATER WA
    6053

    (08) 9272 3311
    0405 148 062

    Comment


    • #3
      To write code goto Tools -> Macro -> Visual Basic Editor.
      www.alertmotorcycleschool.com

      7 Cossom Place
      BAYSWATER WA
      6053

      (08) 9272 3311
      0405 148 062

      Comment


      • #4
        what fiddy pence said hehe, did u mean to write them as a macro thing? or is it just the code in the cells thing?

        im not sure what im talking about...... :oops:
        Gankaz DaOgre

        Gallery

        Comment


        • #5
          I mean I want to put a formula in A3 that will encompass a single formula that will do the above.

          So on the eight day, after wasting time faffing about with unimportant guff like heaven & earth & the waters & sky & creatures [& having a wee kip] & man.... God created PSB (GenesiSX-R1000)

          Comment


          • #6
            Cool - gimme 2 mins.
            www.alertmotorcycleschool.com

            7 Cossom Place
            BAYSWATER WA
            6053

            (08) 9272 3311
            0405 148 062

            Comment


            • #7
              Hey Deej,

              I couldn't get the logic to work in the way you described it.

              But I assume you want the lowest value, only if both number are non-zero. ( ? )

              How's this rewording. "If A1 AND A2 are not equal to zero, then choose the lowest value."

              =IF(A1&A2<>0,MIN(A1,A2),"Error")

              If you what the largest then just change MIN to MAX.

              This help?
              sigpic

              Comment


              • #8
                Type this in (something to start with):

                = IF(A1>A2, A2, A1)

                I don't know that you can do an "else" within a cell like you want. I think you have to code.
                www.alertmotorcycleschool.com

                7 Cossom Place
                BAYSWATER WA
                6053

                (08) 9272 3311
                0405 148 062

                Comment


                • #9
                  aaaah yeah thats what i thot
                  i think its something like

                  =(if ((A1 > A2) i can't remember the rest, not even sure if this is right.

                  hehhe i'll tell u when i get to try it, no excess on work computer =/

                  *edit*

                  lol yeah i thot mine was wrong
                  Gankaz DaOgre

                  Gallery

                  Comment


                  • #10
                    ok buddy something like this - play with the numbers in A1 and A2.

                    =IF(A1>A2,IF(A2>0,A2,""),IF(A1>0,A1,""))

                    This definitely works and produce the result you want.
                    www.alertmotorcycleschool.com

                    7 Cossom Place
                    BAYSWATER WA
                    6053

                    (08) 9272 3311
                    0405 148 062

                    Comment


                    • #11
                      .
                      www.alertmotorcycleschool.com

                      7 Cossom Place
                      BAYSWATER WA
                      6053

                      (08) 9272 3311
                      0405 148 062

                      Comment


                      • #12
                        i took those out as u had done it ...nice work .. .. and it was a lot cleaner than wat i was preposing ...

                        the other way to do it would be to reference from a table and enter the data in a separate table and then link to that .. this means u can do one set of calcs in one cell and then pass the results..

                        or create two hidden cells that cal the two separate results form then pass this data to a third cell where u can do a comparison on the results .. just thoughts ..

                        or do a lookup ... and a comparison ..
                        Some say he eats sidchrome for breakfast

                        Some say he only showers on even days of the week

                        Some say he put an R1 motor in a coffee machine

                        All we know is he's Hewie.

                        Comment


                        • #13
                          Cheers Hewie - just had a luser on the phone piss me off......
                          www.alertmotorcycleschool.com

                          7 Cossom Place
                          BAYSWATER WA
                          6053

                          (08) 9272 3311
                          0405 148 062

                          Comment


                          • #14
                            Call centre ... or Hell desk ???
                            Some say he eats sidchrome for breakfast

                            Some say he only showers on even days of the week

                            Some say he put an R1 motor in a coffee machine

                            All we know is he's Hewie.

                            Comment


                            • #15
                              Neither - but support the helpdesk
                              www.alertmotorcycleschool.com

                              7 Cossom Place
                              BAYSWATER WA
                              6053

                              (08) 9272 3311
                              0405 148 062

                              Comment

                              Working...
                              X