+ Reply to Thread
Results 1 to 5 of 5

Converting / translating / representing "multiple numbers" as "single unit" ? Table ?

  1. #1
    Registered User
    Join Date
    02-08-2004
    Posts
    58

    Converting / representing IF-THEN-ELSE ? *EDITED, How to make a Command Button ???*

    [EDITED]

    Is a a command "button" that will run a massive formula (Instead of having it inside the cell) possible ?

    I could use that to process a compeltely different way that I could figure out myself .... Any help is appricaited...
    Thanks !

    Example -> button
    =if(a1 = 250, z1 = 1)
    =if(a2 = 251, z1 = 2)
    =if(a3 = 252, z1 = 3)
    =if(b1 = 257, y1 = 1)
    =if(b2 = 258, y2 = 2)
    =if(b2 = 259, y2 = 3)

    etc...
    [EDIT]







    -->original post

    Hey all, its been a while,,,
    I can't figure out how to "minipulate multiple numbers as a single unit "...
    (I dont know how else to explain it, ....)
    -----------------------------

    [EDIT]
    [UPDATE, trying to figure out IF THEN ELSE - see the below reply post]
    [EDIT]

    Example, MONDAY tab is my spreadsheet to auto-total my totals. However,
    I must hand write a second sheet because I must list out the actual codes,
    such as "209, 401, 403" ---

    As an example,
    The code 401 simply means "one *FIRST* box" BUT, the code 402 could mean
    either (1) (2) or (3) boxes *additional* boxes. If I install *3* boxes,
    I would use codes 401 & 403. THIS TRANSLATES TO A *401* & *(Two)* 402 CODES* on my totals sheet ... What I need to do, is after I type the
    "2" "402"'s in the MONDAY tab, have the code "403" automatically
    generated/typed out in the "codes" box on the PRINT1 worksheet.

    I know its confusing but does that make sense ?


    402-404 (Up to three)
    411-413 (Up to three)
    453-456 (Up to four)
    250-255 (Up to six)
    257-262 (Up to six)
    214-216 (Up to three)

    And if that wasn't confusing enough,
    358,363 (up to two, BUT, the second 358 code is actually a 363 code (NOT 359) - A code of 363 MEANS (2) two 258's ... seriously)
    -------------------------------------------
    I can handle the details if I could be directed on "HOW TO" even go about doing this.





    THANKS !!!
    Attached Files Attached Files
    Last edited by BaLLZaCH; 01-20-2008 at 06:45 PM.
    Sig ? How can I sign the computer screen ?

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi,

    May be this is a start to sorting out the codes required?

    I’ve looked at your Monday sheet and it may be easier to calculate the codes there – see column S. The only one that doesn’t work properly is T/C, but could you modify your sheet so that it does?
    Attached Files Attached Files
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Registered User
    Join Date
    02-08-2004
    Posts
    58
    [edit - updated code]

    Hey oldchippy,
    Thanks for trying to help ...


    Interesting code, I like how you took the basic math method :-)


    BUT, I also forgot to mention several other variables - hehe sorry ...

    First of all, instead of simply using the daily totals - each column would use the JOB totals - NO big deal, I can handle that ...

    But the tricky part is this:

    When the numbers of the multipliers (Say for example, 250-255) go beyond (6), there "Is no such thing" - it stops at six. So, the stupid tricky part of this for me is that (10) '250' codes ACTUALLY is two codes, "255" and "253" not simply a 260 ... hhaaha


    [edited]
    If I was doing this in vb or dos batch, I would do this: (Roughly)
    (In this case, the multiplier is 6, which represents the 250 and 257 code set (explained above)

    {
    -if q26 = null then goto end
    -set %multiplier = 6
    -set %multiplierDBL = 12
    -set %var2 = q26
    ---:loop1
    -----if %var2 > %muliplierDBL then { (s26 = s26 + "," + ( %multiplier + %count(left(c26,3) ) ) | set %var2 ( %var2 - %multiplier ) | goto loop1 }
    ---:loop2
    -----if %var2 > %multiplier then {
    -------%var2 = %var2 - %multiplier
    -------s26 = s26 + "," + ( %var2 + %count(left(c26,3) )
    -------goto loop2
    -----}
    ---else s26 = s26 + "," + ( %var2 + %count(left(c26,3) )
    -:end
    }

    I know this "exact" code WILL NOT WORK but it is a reference of what I think that path "i would take" would be like ...

    I just dont know how to do this with EXCEL.


    Thanks again !
    Last edited by BaLLZaCH; 01-20-2008 at 03:05 PM.

  4. #4
    Registered User
    Join Date
    02-08-2004
    Posts
    58

    EDITED - updated with easier, BETTER IDEA

    EDITED - updated with easier, BETTER IDEA

    OK, I have a better idea, easier and much less complicated...





    How can I create a "Button" or a script/macro that runs a massive formula WHEN I CLICK IT, not in real time ???


    Thats all I need to figure out to make this work a different way ....
    Thanks

  5. #5
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

+ 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