+ Reply to Thread
Results 1 to 28 of 28

help with a problem calculating a cell

Hybrid View

mikerules help with a problem... 07-02-2012, 04:45 AM
Russell Dawson Re: help with a problem... 07-02-2012, 04:53 AM
Marcol Re: help with a problem... 07-02-2012, 05:04 AM
mikerules Re: help with a problem... 07-13-2012, 12:36 AM
Marcol Re: help with a problem... 07-13-2012, 05:42 AM
mikerules Re: help with a problem... 07-15-2012, 11:23 PM
vlady Re: help with a problem... 07-16-2012, 01:10 AM
mikerules Re: help with a problem... 07-16-2012, 01:54 AM
vlady Re: help with a problem... 07-16-2012, 02:40 AM
vlady Re: help with a problem... 07-16-2012, 04:27 AM
mikerules Re: help with a problem... 07-17-2012, 12:52 AM
vlady Re: help with a problem... 07-17-2012, 01:10 AM
mikerules Re: help with a problem... 07-17-2012, 03:18 AM
vlady Re: help with a problem... 07-17-2012, 03:26 AM
mikerules Re: help with a problem... 07-17-2012, 03:44 AM
vlady Re: help with a problem... 07-17-2012, 04:11 AM
mikerules Re: help with a problem... 07-18-2012, 12:14 AM
vlady Re: help with a problem... 07-18-2012, 12:42 AM
mikerules Re: help with a problem... 07-18-2012, 01:23 AM
vlady Re: help with a problem... 07-18-2012, 01:47 AM
mikerules Re: help with a problem... 07-18-2012, 02:05 AM
vlady Re: help with a problem... 07-18-2012, 02:07 AM
mikerules Re: help with a problem... 07-18-2012, 02:38 AM
vlady Re: help with a problem... 07-18-2012, 02:50 AM
mikerules Re: help with a problem... 07-18-2012, 02:59 AM
vlady Re: help with a problem... 07-18-2012, 03:09 AM
mikerules Re: help with a problem... 08-08-2012, 03:23 AM
Cutter Re: help with a problem... 08-08-2012, 09:57 AM
  1. #1
    Forum Contributor
    Join Date
    07-02-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    221

    help with a problem calculating a cell

    Formula in col H is =+(J14-K14)*F14.
    If k is blank or has a 0 I want H to be 0 however I dont know how to make the formula the greater of one or the other or default to 0 if cell K is zero

    F G H I J K

    CASE PACK UNIT RETAIL STORE ORDER QTY (UNITS) EXTENDED RETAIL MIN OH CASE REQ CURRENT CASE OH


    18 $0.79 72 $56.88 4
    =+(J14-K14)*F14 =+H14*G14
    Attached Files Attached Files
    Last edited by mikerules; 07-13-2012 at 12:11 AM.

  2. #2
    Forum Contributor Russell Dawson's Avatar
    Join Date
    03-01-2012
    Location
    Yorkshire, England
    MS-Off Ver
    2007
    Posts
    608

    Re: help with a problem calculating a cell

    Hi - welcome to the forum. It really would help if you could upload a sample workbook.

    Cheers
    If I helped, please don't forget to add to my reputation. (click on the star below the post)

    If the problem is solved, please: Select Thread Tools (on top of your 1st post) -> Mark this thread as Solved.

    Failure is not falling down but refusing to get up.

  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: help with a problem calculating a cell

    Maybe, to return a blank in H14
    =IF(K14>0,(J14-K14)*F14,"")
    or
    to return zero
    =IF(K14>0,(J14-K14)*F14,0)
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  4. #4
    Forum Contributor
    Join Date
    07-02-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: help with a problem calculating a cell

    I tried this and it does not quite do what I need. I have attached the file so you can see it.

    If you look at cell ac13 which is in yellow it is blank. AB13 tell me that 2 is the standard on hand. we are suppose to populate ac13 with the current on hand and the difference will then be the order qty. The formula you gave me is in h13 and it works so long as an entry is made to ac13 but if we are sold out of the product and leave ac13 blank or put a zero then nothing gets ordered instead to the max of 2 getting ordered.

    your formula is good if in this case by entering 0 in ac13 we are ordering 36pc but currently it is not reading the 0 and nothing is ordered

    If we put a 2 in ac13 nothing gets ordered which is correct
    If we put a 0 in ac13 nothing gets ordered which is incorrect as it should be ordering the max of 2
    ???maybe j13 and k13 should only add where the content is say between 0 and 100 and ignore blank cells

    Is it possible to prevent the number entered in ac13 from being greater than ab13 because in this case if you enter 3 it goes neg which is wrong



    Quote Originally Posted by Marcol View Post
    Maybe, to return a blank in H14
    =IF(K14>0,(J14-K14)*F14,"")
    or
    to return zero
    =IF(K14>0,(J14-K14)*F14,0)

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: help with a problem calculating a cell

    You posted workbook is password protected, this makes it difficult to work with.

  6. #6
    Forum Contributor
    Join Date
    07-02-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: help with a problem calculating a cell

    I have posted a new unlocked version
    Attached Files Attached Files

  7. #7
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: help with a problem calculating a cell

    i provided the solution on above sample file...
    is it wrong...?????
    if current full box is 0 and min box is 2 ---order quantity is 2 x 18 right??

    if current full box is 1 and min box is 2 ---order quantity is 1x 18 right??

    if current full box is empty and min box is empty so no order quantity -0

    ifthe above is not the case can you elaborate using a sample numbers....
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  8. #8
    Forum Contributor
    Join Date
    07-02-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: help with a problem calculating a cell

    I have attached a file and the numbers you have quoted are all correct but if you look at the sheet you will see the problem.

    All of the area in yellow is blank as it would be every time we go to use a new copy of it. Not having entered a 0 or qty means the order total should be empty but if you look at the total order at top center the order total is over 6,000. It is ordering everything as if a o had been entered in the yellow box and this is incorrect
    Attached Files Attached Files

  9. #9
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: help with a problem calculating a cell

    maybe this one...


    Morton-Clarke Order Form.xlsx

  10. #10
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: help with a problem calculating a cell

    this is better ...

    in K13
    =IF(SUMPRODUCT(--(L13:AG13<>""),--(MOD(COLUMN(L13:AG13),2)))=0,"",SUMPRODUCT(--((MOD(COLUMN(L13:AG13),2)=1)*(L13:AG13))))

    in H13
    =IF(K13="",0,(J13-K13)*F13)

  11. #11
    Forum Contributor
    Join Date
    07-02-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: help with a problem calculating a cell

    OK that is great! you are my hero haha cause I could not have fixed that.

    Next question is there any way of limiting the amount put in col in yellow to the number shown in col to the left. If there is no number to the left the cell can be locked but otherwise if 12 is the order max as in ab14 then if someone enters more than that in ac14 then the order becomes a neg number and screws up everything

  12. #12
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: help with a problem calculating a cell

    use data validation

    -select entire yellow in column M
    -go to "data" - data validation-choose -"custom"
    type... =M13<=L13
    untick the "Ignore blank"

    you have to do this on every yellow column changing the cell reference..

  13. #13
    Forum Contributor
    Join Date
    07-02-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: help with a problem calculating a cell

    OK so I thought this was done but it still has an odd problem. I have attached a copy with the latest formulas you gave me.

    If you look at line 15 where I have entered 1 in col M this should cause 0 to be ordered and the order value should be zero. It seems by entering that 0 now the rest of the blank yellow cells are being defaulted as if they had o in them and causing the max on the line to be ordered.
    Attached Files Attached Files

  14. #14
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: help with a problem calculating a cell

    you have total 5 Min O.H. you have values in Columns(M,T,AB)-- less 1 that's 4 multiplied by 18 is 72 i think that's correct
    you previous formulas for the yellow column was sum them up it's just the same with the formula i gave.

  15. #15
    Forum Contributor
    Join Date
    07-02-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: help with a problem calculating a cell

    Col L, T, AB are min on hand and M, U, AC are where I put the order qty.

    1 in col M means we have 1 and the order qty is 0
    No entry has been made to col U or AC therefore no qty should be ordered.

    If you clear contents in just M you will see all of the order for the line will go to zero even though no change was made to U or AC

    By putting an entry in M this should only adjust the order based on what is in L

  16. #16
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: help with a problem calculating a cell

    can you try this in column J pull down..
    =IFERROR(SUM(IF(M13<>"",L13),IF(U13<>"",T13),IF(AC13<>"",AB13)),"")

    i think the error there is how we compute column J
    maybe ??.

  17. #17
    Forum Contributor
    Join Date
    07-02-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: help with a problem calculating a cell

    Hi

    Thanks so much, I think that resolves the problem. I will but the sheet to real use and see how it functions.

    Do you know if there is a way to change the function of the tab button to tab vertical instead of horizontal?

    If I want to add A1 minus B1 to get a total in C1 but not populate C1 if B1 is empty how would the formula look?


  18. #18
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: help with a problem calculating a cell

    if B1 is surely empty..

    =if(B1="","",A1-B1)

    through vba here's sample:


    VISUAL BASIC EDITOR
    INSERT MODULE
    COPY THE FOLLOWING
    Sub goingdown()
    Dim A As Range
    Set A = Selection
    A.Offset(1, 0).Select
    End Sub
    Public Sub WORKBOOK_OPEN()
    Const TECLAS = "{TAB}"
    Application.OnKey kEY:=TECLAS, PROCEDURE:="goingdown"
    End Sub

  19. #19
    Forum Contributor
    Join Date
    07-02-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: help with a problem calculating a cell

    I get the following error message

    The following features cannot be saved in macro free workbooks

    vb project

  20. #20
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: help with a problem calculating a cell

    the code
    insert this in a module.
    Sub goingdown()
    Dim A As Range
    Set A = Selection
    A.Offset(1, 0).Select
    End Sub
    double click the "This workbook" then paste this..
    Private Sub WORKBOOK_OPEN()
    Const TECLAS = "{TAB}"
    Application.OnKey Key:=TECLAS, PROCEDURE:="goingdown"
    End Sub
    close the window then save as ***macro-enabled workbook

  21. #21
    Forum Contributor
    Join Date
    07-02-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: help with a problem calculating a cell

    Perfect got that to work....and I am learning haha

  22. #22
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: help with a problem calculating a cell

    yeah sure, nice to help someone.
    if you don't have any queries, can you mark this thread solved. thanks.

  23. #23
    Forum Contributor
    Join Date
    07-02-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: help with a problem calculating a cell

    I am not sure if you received my last message on this but this is giving me a new problem. It is not happening on all the lines or all the cells so I think it is somehow the way I have pasted the formulas.

    By entering in yellow the max number shown to the left which should result in 0 ordered the order is being put into a neg total. The first few lines appear to be fine but if you look at line 18 V and W is going negative however on the same line AB and AC are calculating correctly. What have I done????
    Attached Files Attached Files

  24. #24
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: help with a problem calculating a cell


  25. #25
    Forum Contributor
    Join Date
    07-02-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: help with a problem calculating a cell

    Thanks what was the issue as the 2nd part of the form below also has the same problem?

  26. #26
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,366

    Re: help with a problem calculating a cell

    sorry didn't look there just for now,
    yes same problem but you can drag it down (formula in J and K) and just edit the (cells ) i.e. headers that will be affected by dragging.

  27. #27
    Forum Contributor
    Join Date
    07-02-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    221

    Re: help with a problem calculating a cell

    Hi,

    I was wondering if you could answer a question for me.

    Here is the situation. I have 3 sheets in a spreadsheet and want to enter information in sheet one which will then populate one of the other 2 sheets depending on the information entered on sheet 1.

    In sheet 1 column A I will enter A or B and in column B I will type a statement " The Dog jumps over the fence"

    If I enter an A in column A (sheet 1) I want the statement In B (sheet 1) to be copied to Column B on sheet 2
    If I enter a B in column A (sheet 1) I want the statement in B (sheet 1) to be copied to Column B on sheet 3

    Can you tell me if this is possible?

    Thanks,

    Mike

    PS the other sheet you helped me with is working great, Thanks

  28. #28
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: help with a problem calculating a cell

    @ mikerules

    Based on your last 2 posts it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    It also appears that your last post is raising a separate issue, unrelated to the issue for which you started this thread. That being the case, you need to start a new thread.

+ 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