+ Reply to Thread
Results 1 to 8 of 8

Deduction of dates issue, macros

  1. #1
    Registered User
    Join Date
    01-07-2014
    Location
    France
    MS-Off Ver
    Excel 2010
    Posts
    5

    Question Deduction of dates issue, macros

    Hi everyone,
    I would really appreciate your help.. Here is a summary -
    I have 2 sheets - Sheet1 and Sheet2. On both sheets I have column 2, which contains the name of the country, and column 3, which contains the name of the product. Column 7 contains the date in dd/mm/yyyy format, but the dates are different on different sheets.
    The task is to deduct column7/sheet1 from column7/sheet2 and to put it in column8/sheet2.
    I have written a part of the macros, which checks if column2 and column3 values are the same on 2 sheets - code is below. So in anyone could help me with deduction part - it would be great. Thanks a lot!!

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Deduction of dates issue, macros

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    01-07-2014
    Location
    France
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Deduction of dates issue, macros

    Thanks Bob, but I tried this one and debugger respons with type mismatch error.
    Last edited by skulik; 01-07-2014 at 05:42 AM.

  4. #4
    Registered User
    Join Date
    01-07-2014
    Location
    France
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Deduction of dates issue, macros

    I found the reason of the error - i have some cells with "done" value instead of date. Is there any way to skip rows with non-numeric value?

  5. #5
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Deduction of dates issue, macros

    You could add an IsDate(cell) test to each of the dates that might be wrong.

  6. #6
    Registered User
    Join Date
    01-07-2014
    Location
    France
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Deduction of dates issue, macros

    I added IsDate check for both sheets - now macros runs, but provides no result. I even tried to change the format of display from Mar-13 to 01/03/2013.

  7. #7
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Deduction of dates issue, macros

    Can you post the workbook for us to look at?

  8. #8
    Registered User
    Join Date
    01-07-2014
    Location
    France
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Deduction of dates issue, macros

    Actually I found the final mistake - format of the previous sheet was a bit different. Now everything works fine, i only had to modify the deduction formula to have number of months as a result.
    Thanks a lot!

+ 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. [SOLVED] Automating balance deduction
    By Flipperson in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-04-2014, 07:52 AM
  2. [SOLVED] Problem with a tax deduction
    By numbskull in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-02-2012, 09:27 AM
  3. To improve my deduction file
    By Harrold in forum Excel General
    Replies: 4
    Last Post: 11-15-2011, 03:05 AM
  4. deduction time
    By amator in forum Excel General
    Replies: 2
    Last Post: 05-06-2010, 02:47 PM
  5. glass deduction list
    By gasman in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 03-01-2008, 09:12 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