+ Reply to Thread
Results 1 to 15 of 15

Calculate value (Divide)

  1. #1
    Forum Contributor
    Join Date
    03-08-2021
    Location
    thailand
    MS-Off Ver
    2016
    Posts
    117

    Calculate value (Divide)

    I want to calculate value by column FPP divide value column Case.

    Please guide me about it.
    Attached Images Attached Images
    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,917

    Re: Calculate value (Divide)

    Not sure I fully understand what you want, but maybe...
    =E2/D2
    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 Contributor
    Join Date
    03-08-2021
    Location
    thailand
    MS-Off Ver
    2016
    Posts
    117

    Re: Calculate value (Divide)

    Yes =E2/D2

    Please guide me about it.

  4. #4
    Registered User
    Join Date
    03-19-2022
    Location
    TBD
    MS-Off Ver
    O365
    Posts
    46

    Re: Calculate value (Divide)

    At column 2, row 2, Type =, column5 row2, / , column 4 row 2 , then you will see the formula =RC[-1]/RC[-2]
    And you can copy this formula down to other rows.

  5. #5
    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,917

    Re: Calculate value (Divide)

    Or, just copy my formula where you need it to be, then copy down as needed

  6. #6
    Forum Contributor
    Join Date
    03-08-2021
    Location
    thailand
    MS-Off Ver
    2016
    Posts
    117

    Re: Calculate value (Divide)

    If I want use code VBA.
    How to edit it ?

  7. #7
    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,917

    Re: Calculate value (Divide)

    why would you want to use VBA on something so simple?

  8. #8
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,409

    Re: Calculate value (Divide)

    VBA solution:
    PHP Code: 
    Option Explicit
    Sub test
    ()
    Dim Lr&, k&, arr(), cell As Range
    Lr 
    Cells(Rows.Count"E").End(xlUp).Row
    ReDim arr
    (1 To Lr 11 To 1)
        For 
    Each cell In Range("E2:E" Lr)
            
    1
            
    If cell.Offset(0, -1).Value <> 0 Then arr(k1) = cell cell.Offset(0, -1).Value
        Next
    Range
    ("F2").Resize(k1).Value arr
    End Sub 
    Quang PT

  9. #9
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Try this !


    According to the attachment a VBA demonstration for starters :

    PHP Code: 
    Sub Demo1()
             
    Application.ReferenceStyle xlA1
        With Range
    ("F2:F" & [A1].CurrentRegion.Rows.Count)
            .
    NumberFormat "#,##0.00_-"
            
    .Value2 Evaluate(Replace("IF(D2:D#<>0,E2:E#/D2:D#,"""")""#", .Rows.Count 1))
        
    End With
    End Sub 
    ► Do you like it ? ► So thanks to click on bottom left star icon « Add Reputation » !
    Last edited by Marc L; 03-21-2022 at 05:53 AM. Reason: adding columns style …

  10. #10
    Valued Forum Contributor
    Join Date
    06-27-2010
    Location
    sYRIA
    MS-Off Ver
    Excel 2013
    Posts
    669

    Re: Calculate value (Divide)

    Hi Mr Marc L
    Just To know
    Why not
    Please Login or Register  to view this content.

  11. #11
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Calculate value (Divide)


    Hi mohadin,

    just 'cause I wrote .Value2 rather than .Formula according to the attachment without any formula …

  12. #12
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: Calculate value (Divide)


    I edited my post #9 demonstration for the columns style …

  13. #13
    Valued Forum Contributor
    Join Date
    06-27-2010
    Location
    sYRIA
    MS-Off Ver
    Excel 2013
    Posts
    669

    Re: Calculate value (Divide)

    Thank you for the reply

  14. #14
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Thumbs up Re: Calculate value (Divide)


    But mohadin if the formulas are necessary your way is the best as it works whatever the columns style !

  15. #15
    Valued Forum Contributor
    Join Date
    06-27-2010
    Location
    sYRIA
    MS-Off Ver
    Excel 2013
    Posts
    669

    Re: Calculate value (Divide)

    Many Thanks Mr Marc L
    Best regards for here

+ 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. Pivot Table Calculate Field to divide total number of jobs by day type
    By quentin5000 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 09-05-2019, 10:16 PM
  2. [SOLVED] Need to calculate % of building to divide property taxes
    By sabbur in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 12-28-2016, 07:01 PM
  3. Calculate age of items and divide them in age groups
    By markosvoul in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-18-2014, 04:37 PM
  4. [SOLVED] Calculate Percent Change while avoiding Divide/0 error.
    By bycrofbl in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-26-2014, 12:56 AM
  5. Calculate amount based on circumference / divide total in 2 locations
    By JACKIECOTHRON in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-25-2012, 02:55 PM
  6. Replies: 0
    Last Post: 04-15-2011, 11:06 AM
  7. How to calculate in Excel sheet eg. add or divide any thing and i.
    By Suku in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 02-15-2005, 08:54 PM

Tags for this Thread

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