+ Reply to Thread
Results 1 to 23 of 23

#VALUE to 0 if there is no data?

  1. #1
    Registered User
    Join Date
    04-18-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    16

    Question #VALUE to 0 if there is no data?

    Hi

    I'm From The Netherlands

    Unsolved

    My New Question is on Page 2 plz Look ...................



    Solved

    I want to register every day working Hours
    I got 2 things to input every day.

    - Working Date
    - Working Hours
    1. How can i calculate The total working hours every week. (Monday to Sunday)
    2. I would like to input the Working Date and Working Hours (using H8 and H10) and after i
    press a button, it put the data to the Left side of Column A and B. Can someone help me plz.
    I do not know howto programm (using the vba code)
    3. Is it possible to Display the current date in H8, every time i open Excel
    anwser by Forum Moderator Arlette : To display the current date, put this formula in H8 =today().

    4. Could you explain how the code works? if needed i can modify in the future.
    5. Could you make The latest Date and value on top and old below.
    All new (Working Hours)date and value will be on A17 and B17
    (Plz look at the attached picture) And for Lunchtime will be on R17 and S17

    6. Unsolved I get a error message after i press the lunch Button
    I dont understand why.. :-(

    7. You said in Notes: I've added a named dynamic ranges. Which code do u mean?

    8. Except there is a small little problem.
    After i press the Lunch Button. I can see in Location O13.
    The following:
    A. #######
    B. then it shows Total
    - Is there a way to fix the #######

    9. I need a formula .
    How to display 3 different image based on if-condition?
    Using one random value to show images.
    Random number could looks like: 7 or 7,4 (seven point four)

    If <=13 then show c5 which contain the image1
    If >=14 and <=20 then show c6 which contain the image2
    If >=21 then show c7 which contain the image3

    10. Could you tell me how to change to zero:---------- > * *0

    -----------------------------------------------


    Thank You
    Ray

    ---------------Picture ------------------------
    working Hours v1.jpg

    --------------- Excel Document ----------------
    working Hours v1.xls
    Last edited by raygra; 04-27-2012 at 10:33 AM.

  2. #2
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: Office 2003 2007 - Calculate Total Hours every week (I need help) ?

    I think I cover your problem regarding point 1 & 2 by using dynamic PivotTable (Blad2).

    Look at provided file. If you will need more assit just let me know.
    Attached Files Attached Files
    Best Regards
    MaczaQ
    ---------------------------------------------------------------------------------------------------------------------------
    If you are satisfied with the solution(s) provided, please mark your thread as Solved
    If you are pleased with my answer consider to rate it. To thank someone who has helped you, click on the star icon below their name.
    - This way you will add him some reputation points ... thanks in advance.

  3. #3
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Office 2003 2007 - Calculate Total Hours every week (I need help) ?

    hi raygra, option to make it, please check attachment
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    04-18-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    16

    Thumbs up Re: Office 2003 2007 - Calculate Total Hours every week (I need help) ?

    Quote Originally Posted by watersev View Post
    hi raygra, option to make it, please check attachment
    Hi Watersev, Thank you for the Attached File. This is what Im looking for :-). thank you very much.

    Still I have some more Questions:

    4. Could you explain how the code works? if needed i can modify in the future.
    5. Could you make The latest Date and value on top and old below.
    All new (Working Hours)date and value will be on A17 and B17
    (Plz look at the attached picture) And for Lunchtime will be on R17 and S17
    6. I would like another button for lunchtime, almost same as working Hour
    But this is on the Right side now(Plz look at the attached picture)


    Quote Originally Posted by maczaq View Post
    I think I cover your problem regarding point 1 & 2 by using dynamic PivotTable (Blad2).

    Look at provided file. If you will need more assit just let me know.

    Hi MaczaQ, Thank you for helping and providing the File. I must say It is close.
    What i looking for. I think i gonna use the '"Watersev file'".
    But thanks anyway ;-)

    --------- Picture ----------------
    Picture .jpg
    Last edited by raygra; 04-19-2012 at 09:13 PM.

  5. #5
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Office 2003 2007 - Calculate Total Hours every week (I need help) ?

    4. The code with comments:

    Please Login or Register  to view this content.
    5. Done with a sort in code attached to the button
    6. I think you can handle that part yourself basing on the ready sample for a Week case

    please check attachment

    Notes:
    1. I've added named dynamic ranges for the formula to count correctly after new data entered, for the chart to reflect new date and hours and sorting of the data
    2. I've added Validation for F8 and F10
    Attached Files Attached Files
    Last edited by watersev; 04-20-2012 at 05:23 AM.

  6. #6
    Registered User
    Join Date
    04-18-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Office 2003 2007 - Calculate Total Hours every week (I need help) ?

    4. Solved Thank you.
    5. Solved Thank you.


    First code--------
    =SOMPRODUCT((A17:A100>=today()-(WEEKDAY(Today();2)-1))*(A17:A100<=Today()+(7-WEEKDAY(Today();2)))*B17:B100)

    Second code -------
    =SOMPRODUCT((WHdates>=today()-(WEEKDAY(Today();2)-1))*(WHdates<=Today()+(7-WEEKDAY(Today();2)));WHhour)


    I use the old First Code, to control where to get the Value of Lunch to get the total

    Quote Originally Posted by watersev View Post

    Notes:
    1. I've added named dynamic ranges for the formula to count correctly after new data entered, for the chart to reflect new date and hours and sorting of the data

    6. Unsolved I get a error message after i press the lunch Button
    I dont understand why.. :-(

    7. You said in Notes: I've added a named dynamic ranges. Which code do u mean?


    -------- Attachment Error File -----------
    working_hours(1) (2) Error.xls
    Last edited by raygra; 04-20-2012 at 10:16 AM.

  7. #7
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Office 2003 2007 - Calculate Total Hours every week (I need help) ?

    you need to:

    1. Create new dynamic named ranges
    2. Amend formulas to refer to new named ranges
    3. Amend chart source ranges to refer to new chart range
    4. Amend button code to have correct cell references
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    04-18-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Office 2003 2007 - Calculate Total Hours every week (I need help) ?

    Thanks for the file. Everyting works just fine :-).

    8. Except there is a small little problem.
    After i press the Lunch Button. I can see in Location O13.
    The following:

    A. #######
    B. then it shows Total

    - Is there a way to fix the #######

    Ray
    Last edited by raygra; 04-27-2012 at 10:27 AM.

  9. #9
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Office 2003 2007 - Calculate Total Hours every week (I need help) ?

    please check attachment
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    04-18-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Office 2003 2007 - Calculate Total Hours every week (I need help) ?

    Excellent............................. Thank you.
    You the best :-)

  11. #11
    Registered User
    Join Date
    04-18-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Office 2003 2007 - Calculate Total Hours every week (I need help) ?

    ----------- Picture ------------
    1.jpg
    ----------- ------- ------------


    I did try to move
    Column A + B to C and D
    Column Q + R to O and P

    it worked but. Now the location O13 (O is letter not number) got a error (Did not get Total)
    The Blue and green lines did not move.
    Last edited by raygra; 04-22-2012 at 12:09 PM.

  12. #12
    Registered User
    Join Date
    04-18-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Office 2003 2007 - Calculate Total Hours every week (I need help) ?

    Hi Watersev you online?

  13. #13
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Office 2003 2007 - Calculate Total Hours every week (I need help) ?

    check named ranges used in formula and their references. You have working sample file in post #9

  14. #14
    Registered User
    Join Date
    04-18-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Office 2003 2007 - Calculate Total Hours every week (I need help) ?

    Ok Thank You.

  15. #15
    Registered User
    Join Date
    04-18-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: Office 2003 2007 - Calculate Total Hours every week (I need help) ?

    ----------------------

    My Question is on Page 2 plz Look ...................
    Last edited by raygra; 04-24-2012 at 08:38 AM.

  16. #16
    Registered User
    Join Date
    04-18-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    16

    Question How to display 3 different image based on if-condition?

    Hi

    9. I need a formula .
    How to display 3 different image based on if-condition?
    Using one random value to show images.
    Random number could looks like: 7 or 7,4 (seven point four)

    If <=13 then show c5 which contain the image1
    If >=14 and <=20 then show c6 which contain the image2
    If >=21 then show c7 which contain the image3

    Thank you
    Ray
    Last edited by raygra; 04-27-2012 at 10:31 AM.

  17. #17
    Registered User
    Join Date
    04-18-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    16

    Question How to display 3 different image based on Value DROPdown?

    How to display 3 different image based on Value DROPdown?

    I dont know how to get Picture 5 to work?
    Plz look at the file

    ---------- Attachment made in excel 2010--------------
    Lookup_Pic_example.xls

  18. #18
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: image based on Value DROPdown?

    please check attachment,

    Sheet "1" - dropdown with changing foto
    Sheet "2" - picture depends on cell value
    Attached Files Attached Files

  19. #19
    Valued Forum Contributor MaczaQ's Avatar
    Join Date
    06-03-2011
    Location
    Poland
    MS-Off Ver
    Excel 2003 / XP
    Posts
    510

    Re: image based on Value DROPdown?

    hi

    I hash for disable this line
    Please Login or Register  to view this content.
    and then use this simple test for check what pictures you have loaded into workbook:
    Please Login or Register  to view this content.
    Finally I get results which shows that you haven't got picture 5 ;-) so you can not do it visable
    results from test:
    Picture 1
    Picture 2
    Picture 3
    Picture 4

  20. #20
    Registered User
    Join Date
    04-18-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: image based on Value DROPdown?

    ............ Thank you so much watersev :-) Im so happy :-)
    .............maczaq You too, Thank you very much for helping me.

    You both guys are Amazing ........:-)

    Ray

  21. #21
    Registered User
    Join Date
    04-18-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    16

    Question #VALUE to 0 if there is no data?

    THere is a formula that calculate for this week only, if there is no value its shows: #VALUE!

    10. Could you tell me how to change to zero:---------- > 0



    -------------- ATTACHMENT ------------

    Value v2.xls

    -------------- ATTACHMENT ------------
    Last edited by raygra; 04-27-2012 at 10:31 AM.

  22. #22
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: #VALUE to 0 if there is no data?

    please check attachment
    Attached Files Attached Files

  23. #23
    Registered User
    Join Date
    04-18-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    16

    Re: #VALUE to 0 if there is no data?

    I compare the old Formula with the new Formula. Awesome.... Thank you again watersev ...... ;-)

    =SUMPRODUCT((WHdates>=TODAY()-(WEEKDAY(TODAY();2)-1))*(WHdates<=TODAY()+(7-WEEKDAY(TODAY();2)));WHhour)

    Vs

    =SUMPRODUCT((WHdates>=TODAY()-(WEEKDAY(TODAY();2)-1))*(WHdates<=TODAY()+(7-WEEKDAY(TODAY();2)));WHhour*1)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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