+ Reply to Thread
Results 1 to 9 of 9

Multiply the value by time.

  1. #1
    Forum Contributor tax112's Avatar
    Join Date
    02-28-2013
    Location
    Thailand
    MS-Off Ver
    Excel 2016 | 2019
    Posts
    438

    Multiply the value by time.

    Hi members.
    My problem is as follows:
    Column A from 00h00m to 07h00m, the value of column B is multiplied by 2.5.
    Column A from 07h10m to 13h00m, the value of column B is multiplied by 3.5.
    Can someone help me.
    Thank you.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Multiply the value by time.

    You could do it with a formula in column C

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by AlphaFrog; 07-19-2021 at 06:27 AM.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor tax112's Avatar
    Join Date
    02-28-2013
    Location
    Thailand
    MS-Off Ver
    Excel 2016 | 2019
    Posts
    438

    Re: Multiply the value by time.

    @AlphaFrog:
    Thank you.
    Can someone use vba code for me?
    Thank you.

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,605

    Re: Multiply the value by time.

    Macro code
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  5. #5
    Forum Contributor tax112's Avatar
    Join Date
    02-28-2013
    Location
    Thailand
    MS-Off Ver
    Excel 2016 | 2019
    Posts
    438

    Re: Multiply the value by time.

    @kvsrinivasamurthy
    from 13h10m to 23h50 the results are not accurate.
    Please review the code for me.
    Thank you

  6. #6
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,605

    Re: Multiply the value by time.

    Conditionsare given for 0 to 7 hrs and 7 to 13 hrs only . Rest there is no condition.
    Code modified
    Please Login or Register  to view this content.
    Last edited by kvsrinivasamurthy; 07-19-2021 at 11:20 AM.

  7. #7
    Forum Contributor tax112's Avatar
    Join Date
    02-28-2013
    Location
    Thailand
    MS-Off Ver
    Excel 2016 | 2019
    Posts
    438

    Re: Multiply the value by time.

    @kvsrinivasamurthy
    I edited the code
    HTML Code: 
    The result is exactly as expected.
    Last edited by tax112; 07-19-2021 at 08:51 PM.

  8. #8
    Valued Forum Contributor
    Join Date
    04-01-2015
    Location
    The Netherlands
    MS-Off Ver
    2003/2007/2010/2016/office 365
    Posts
    880

    Re: Multiply the value by time.

    This gives the same result and is a lot faster when it comes to a lot of data.

    Please Login or Register  to view this content.
    Messages have been translated from Dutch to English by means of google translate.

  9. #9
    Forum Contributor tax112's Avatar
    Join Date
    02-28-2013
    Location
    Thailand
    MS-Off Ver
    Excel 2016 | 2019
    Posts
    438

    Re: Multiply the value by time.

    @Vraag en antwoord
    Your code is short
    Accurate results.
    Thank you.

+ 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. Replies: 3
    Last Post: 03-02-2012, 08:18 PM
  2. Add & Subtract Time, then multiply by $
    By BudParker in forum Excel General
    Replies: 3
    Last Post: 02-08-2009, 03:20 PM
  3. calculate time and multiply it by $ amount
    By DR in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-08-2006, 02:40 AM
  4. [SOLVED] multiply time and currency
    By Janelle in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-26-2006, 06:45 PM
  5. how to multiply time by money
    By chriscadstud in forum Excel General
    Replies: 2
    Last Post: 10-30-2005, 12:05 AM
  6. multiply time and wage
    By KC in forum Excel General
    Replies: 2
    Last Post: 09-14-2005, 03:11 PM
  7. [SOLVED] RE: multiply time and wage
    By TomHinkle in forum Excel General
    Replies: 0
    Last Post: 09-13-2005, 06:05 PM
  8. Multiply Time by currency
    By Strelak in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-17-2005, 11:56 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