+ Reply to Thread
Results 1 to 14 of 14

If statments to inventory analysis

Hybrid View

  1. #1
    Registered User
    Join Date
    10-11-2012
    Location
    denmark
    MS-Off Ver
    Excel 2007
    Posts
    27

    Red face If statments to inventory analysis

    Hey

    I have a datatabel on sheet1 and want to do some calculation on sheet3.

    case:
    hey.jpg

    I want to have an if statement that says:

    if clientid (starting in C3) = 600 then places customergroup (starting in I2) in sheet3 starting in B13

    if clientid don't = 300 then it should not be placed in sheet3

    this if statement should be like if C3 = 600 then places I2 in B13 or don't show in sheet3

    next line if C4 = 600 then places I3 in B14 or don't show it

    This if statement should be run until there are no value in C or I (end same time, but i don't now when it will it will end, because it can chance over time)

    Can someone please help me?
    Last edited by jeffreybrown; 10-13-2012 at 10:17 AM.

  2. #2
    Forum Contributor BeachRock's Avatar
    Join Date
    11-01-2011
    Location
    Oregon, United States
    MS-Off Ver
    Excel 2016
    Posts
    403

    Re: If formula help!

    Hi Bech. You should take a look at the forum rules http://www.excelforum.com/forum-rule...rum-rules.html. You need to post a workbook and not a picture.
    -------------
    Tony

  3. #3
    Registered User
    Join Date
    10-11-2012
    Location
    denmark
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: If formula help!

    Sorry about that, should i uplaod excel fill?

  4. #4
    Forum Contributor BeachRock's Avatar
    Join Date
    11-01-2011
    Location
    Oregon, United States
    MS-Off Ver
    Excel 2016
    Posts
    403

    Re: If formula help!

    No problem. Upload a copy of the book you need help with minus info you don't want to be seen. To do that, click the Go Advanced button on the reply screen. Look for an icon with an attachment symbol on it and click it.

  5. #5
    Registered User
    Join Date
    10-11-2012
    Location
    denmark
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: If statments to inventory analysis

    master makri.xlsm

    Sorry about the thread name, i have changed it now.

    i have attached my file it will by used to import into another excel file an calculate some data from sheet1 on sheet2 and sheet3.

    first thing is that i will like to get my model2 automatic, so if i select number 300 from cellB2.sheet2 it will run the makro model2 and unhid the colums macthing number 300.

  6. #6
    Registered User
    Join Date
    10-11-2012
    Location
    denmark
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: If statments to inventory analysis

    Then to the if statements:

    Sheet3 i will like an if statement there takes data from colums C and I in sheet1 an show them in colum B (starting in B13). the if statement should show value in colum I if colum C = 600 or else do not show. this should be done until there is no more value in C an I.

    In colum A sheet3 starting in A13 it should show the value from colum A sheet1 if colum C = 600, so in A13 the first number will be 21, because thats the first time colum C = 600, do until no more value in colum C and I

    In colum C that the value from colum BQ sheet1 if colum C sheet1 = 600

    and in colum D sheet3 take the value from colum C sheet3 if colum B sheet3 =100 and if colum AB sheet1 = danske aktier, do until the end.

    so the frist row (row13) in sheet3 will end up with A13 = 21 B13 = 100 C13 = 546029,4 D13 = 546029,4

  7. #7
    Registered User
    Join Date
    10-11-2012
    Location
    denmark
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: If statments to inventory analysis

    Are there some one who can help?

  8. #8
    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
    53,047

    Re: If statments to inventory analysis

    please add some examples of your expected outcome to that file, and show how you arrived at the answers. i am having a hard time fifuring out what you need

    thanks
    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

  9. #9
    Registered User
    Join Date
    10-11-2012
    Location
    denmark
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: If statments to inventory analysis

    Hello again

    I just calculated colums A to D on sheet and have to make them into codes

    The Boxes where that shows "hidden or 0" should be hidden and end when there are no value left.

    master makri.xlsm

  10. #10
    Registered User
    Join Date
    10-11-2012
    Location
    denmark
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: If statments to inventory analysis

    I kan oplaod the sheet where i have made the if statements in excel? I just don't no have to code it, will it help?

  11. #11
    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
    53,047

    Re: If statments to inventory analysis

    yes, i was not expecting and code/formula, for a few examples, just enter the value of what you expect the answer to be

  12. #12
    Registered User
    Join Date
    10-11-2012
    Location
    denmark
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: If statments to inventory analysis

    But I need my model to be doing what i have done in the last sheet i uploaded, so i expect the first rows values will be:

    A13 = 21 B13= 100 C13 = 546029,43 D13 = 0

    I should use this makro to many excel sheet where it should calculate the same thing

  13. #13
    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
    53,047

    Re: If statments to inventory analysis

    my question is...just exactly how do you arrive at those values? on what criteria are you basing the search you are doing?

    how do you get 21......i think its the row number on sheet1, but there is nothing to say that you are looking for client 600
    once you explain (exactly) how you get 21, i can probably figure the rest out

  14. #14
    Registered User
    Join Date
    10-11-2012
    Location
    denmark
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: If statments to inventory analysis

    Okay, I find out 21 by saying if clientid = 600 then take value from sheet1.colum(A)

    do this until there no more value in colum C sheet1

    so first exsampel if sheet1.row(C2) = 600 then take value from sheet1.row(A2)

    next exsampel if sheet1.row(C3) = 600 then take value from sheet1.row(A3)


    do until there are now more numbers in colum C sheet1

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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