Results 1 to 10 of 41

Thread: copy,paste,calculate Cell value based on calculations & comparisonsother cells same row. Decimal places

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    10,457
    Rep Power
    10
    This is so simple, that even I find it easy to do, with a formula...



    _____ Workbook: 1.xls ( Using Excel 2007 32 bit )
    Row\Col
    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    1
    Exchange Symbol Series/Expiry Open High Low Prev Close LTP
    2
    NSE ACC EQ
    1087
    1030
    955.5
    998.45
    1079.9
    22
    =IF(H2>D2,1/100*H2,IF(H2))
    =IF(H2>D2,H2-J2,IF(H2))
    3
    NSE ADANIPOWER EQ
    148.05
    27.75
    25.65
    25.65
    146.5
    25
    =IF(H3>D3,1/100*H3,IF(H3))
    =IF(H3>D3,H3-J3,IF(H3))
    4
    NSE DLF EQ
    265
    419.7
    350.05
    387.25
    267.15
    17388
    =IF(H4>D4,1/100*H4,IF(H4))
    =IF(H4>D4,H4-J4,IF(H4))
    5
    NSE AMBUJACEM EQ
    30.4
    155.8
    142.55
    145.85
    29.95
    15083
    =IF(H5>D5,1/100*H5,IF(H5))
    =IF(H5>D5,H5-J5,IF(H5))
    Worksheet: 1-Sheet1

    _____ Workbook: 1.xls ( Using Excel 2007 32 bit )
    Row\Col
    A
    B
    C
    D
    E
    F
    G
    H
    I
    J
    K
    1
    Exchange Symbol Series/Expiry Open High Low Prev Close LTP
    2
    NSE ACC EQ
    1087
    1030
    955.5
    998.45
    1079.9
    22
    =IF(H2>D2,1/100*H2,IF(H2))
    =IF(H2>D2,H2-J2,IF(H2))
    3
    NSE ADANIPOWER EQ
    148.05
    27.75
    25.65
    25.65
    146.5
    25
    =IF(H3>D3,1/100*H3,IF(H3))
    =IF(H3>D3,H3-J3,IF(H3))
    4
    NSE DLF EQ
    265
    419.7
    350.05
    387.25
    267.15
    17388
    =IF(H4>D4,1/100*H4,IF(H4))
    =IF(H4>D4,H4-J4,IF(H4))
    5
    NSE AMBUJACEM EQ
    30.4
    155.8
    142.55
    145.85
    29.95
    15083
    =IF(H5>D5,1/100*H5,IF(H5))
    =IF(H5>D5,H5-J5,IF(H5))
    Worksheet: 1-Sheet1

    Each formula uses 2 Excel If functions, one is nested in the other...

    Code:
    (    If  _>_   , Do this ,  Else [ If _<_ , Do this  , Else "......"    ]    )
    
        If ( _>_   , Do this ,  Else  If( _<_ , Do this  , Else "......"    )    )
    Column J
    Code:
      =IF(H2>D2,1/100*H2,IF(H2)
    
     if column H is greater than column D then calculate 1% of column H
      =IF(H2>D2,1/100*H2,
                         Else
               if column H is lower than column D then calculate 1% of column H
                         IF(H2Else
                                           "D is equal to H"))
    Column K
    Code:
      =IF(H2>D2,H2-J2,IF(H2)
    
     if column H is greater than column D subtract Column H & column J
      =IF(H2>D2,H2-J2,
                      Else
               if column H is lower than column D  add Column H & column J
                      IF(H2Else
                                       "D is equal to H"))


    Alan

    Ref
    https://support.office.com/en-us/art...rs=en-US&ad=US
    https://www.techonthenet.com/excel/formulas/if.php
    Last edited by DocAElstein; 04-18-2020 at 11:46 AM.
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    KILL A MODERATOR!!

Similar Threads

  1. Replies: 26
    Last Post: 09-26-2020, 05:56 PM
  2. Replies: 6
    Last Post: 08-28-2019, 09:42 AM
  3. copy data and paste it in another sheet
    By newbie2 in forum Excel Help
    Replies: 1
    Last Post: 07-15-2015, 01:38 PM
  4. Trapping Copy To Range Before Copy/Cut Paste
    By Rasm in forum Excel Help
    Replies: 4
    Last Post: 04-07-2011, 07:48 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •