Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Spreadsheets (https://www.askmehelpdesk.com/forumdisplay.php?f=395)
-   -   Excel formula (https://www.askmehelpdesk.com/showthread.php?t=370214)

  • Jun 29, 2009, 11:01 AM
    Pajoooo
    1 Attachment(s)
    Excel formula
    Download Attachment, first.

    I need:

    -If B14=empty, then A and D colones both empty

    -If only B14=selected, then A14=TREZOR, D14=1, D15=1, bold underline between C14-L14 and C15-L15, others A and D empty

    -If B14=selected and B15=selected, then A14=TREZOR, A15=-II-, D14=1, D15=1, D16=2, bold underline between C15-L15 and C16-L16, others A and D empty

    -If B14=selected and B15=selected and B16=selected, then A14=TREZOR, A15=-II-, A16=-II-, D14=1, D15=1, D16=1, D17=3, bold underline between C16-L16 and C17-L17, others A and D empty

    ... and so troughout

    Thanks
  • Jul 1, 2009, 02:39 PM
    Pajoooo
    Quote:

    Originally Posted by Pajoooo View Post
    Download Attachment, first.

    I need:

    -If B14=empty, then A and D colones both empty

    -If only B14=selected, then A14=TREZOR, D14=1, D15=1, bold underline between C14-L14 and C15-L15, others A and D empty

    -If B14=selected and B15=selected, then A14=TREZOR, A15=-II-, D14=1, D15=1, D16=2, bold underline between C15-L15 and C16-L16, others A and D empty

    -If B14=selected and B15=selected and B16=selected, then A14=TREZOR, A15=-II-, A16=-II-, D14=1, D15=1, D16=1, D17=3, bold underline between C16-L16 and C17-L17, others A and D empty

    ...and so troughout
    Thanks

    Here are what's shall

    http://www.pttbn.com/11.jpg

    http://www.pttbn.com/22.jpg

    http://www.pttbn.com/33.jpg

    http://www.pttbn.com/44.jpg
  • Jul 1, 2009, 03:07 PM
    JBeaucaire
    1 Attachment(s)

    The formula in D14 is different from the rest of the formulas in D15 down, so don't mix them up.

    D15: =IF(B15<>0,1,IF(B14<>0,SUM($D$14:D14),""))

    The BOLD LINE thing is being handled with conditional formatting.
  • Jul 2, 2009, 05:09 PM
    Pajoooo
    Quote:

    Originally Posted by JBeaucaire View Post
    The formula in D14 is different from the rest of the formulas in D15 down, so don't mix them up.

    D15: =IF(B15<>0,1,IF(B14<>0,SUM($D$14:D14),""))

    The BOLD LINE thing is being handled with conditional formatting.


    Thanks,JBeaucaire. That is it... BUT!!

    SEE PICTURES ABOVE, AGAIN

    Can You set conditional formatting WITHOUT red line, AND black line extend to columns K and L.

    Thanks in advance!!
  • Jul 2, 2009, 07:23 PM
    JBeaucaire
    1 Attachment(s)

    Here you go...
  • Jul 12, 2009, 03:59 AM
    Pajoooo
    Hello,
    Business trip, sorry

    See picture

    http://www.pttbn.com/55.jpg

    I can't set red line to black border.
    Row 48 MUST BE intact.

    Anything else OK.
  • Jul 12, 2009, 07:15 AM
    JBeaucaire
    1 Attachment(s)

    Here you go:
  • Jul 15, 2009, 02:20 PM
    Pajoooo
    1 Attachment(s)
    FOR JBeaucaire, primarily

    I now that is too much from me, but I'm enforced to complet this app.

    1. Black border between C and L columns in transition between first and second page

    2. VBA script for printing. Requirement:

    When B14 selected, then print pages 1,2
    When B14,B15 selected, then print pages 1,2
    When B14,B15,B16 selected, then print pages 1,2,3
    When B14,B15,B16,B17 selected, then print pages 1,2,3
    When B14,B15,B16,B17,B18 selected, then print pages 1,2,3,4
    When B14,B15,B16,B17,B18,B19 selected, then print pages 1,2,3,4
    When B14,B15,B16,B17,B18,B19,B20 selected, then print pages 1,2,3,4,5
    When B14,B15,B16,B17,B18,B19,B20,B21 selected, then print pages 1,2,3,4,5
    When B14,B15,B16,B17,B18,B19,B20,B21,B22 selected, then print pages 1,2,3,4,5,6
    When B14,B15,B16,B17,B18,B19,B20,B21,B22,B23 selected, then print pages 1,2,3,4,5,6
    When B14,B15,B16,B17,B18,B19,B20,B21,B22,B23,B24 selected, then print pages 1,2,3,4,5,6,7
    When B14,B15,B16,B17,B18,B19,B20,B21,B22,B23,B24,B25 selected, then print pages 1,2,3,4,5,6,7

    Trigger for print: Print button (Standard Toolbars)

    Thanks in advance.
  • Jul 15, 2009, 06:12 PM
    JBeaucaire

    Rather than fiddle with cell selection, this will simply ask you how many sheets you want to print.
    Code:

    Sub PrintMacro()
    Dim Cnt As Long

    Cnt = Application.InputBox("Print how many sheets? (1-7)", Title:="Print Sheets", Type:=2)
    If Cnt = False Or Cnt > 7 Then Exit Sub
    ActiveWindow.SelectedSheets.PrintOut From:=1, To:=Cnt, Copies:=1, Collate:=True
    End Sub

    How to use the macro:

    1. Open up your workbook
    2. Get into VB Editor (Press Alt+F11)
    3. Insert a new module (Insert > Module)
    4. Copy and Paste in your code (given above)
    5. Get out of VBA (Press Alt+Q)
    6. Save your sheet

    The macro is installed and ready to use. Press Alt-F8 and select it from the macro list.

    Or, insert a Forms Button from the Forms Toolbar, once on the sheet it will popup a list of the macros in your sheet, select the print macro above.
  • Jul 16, 2009, 12:14 AM
    Pajoooo

    Thanks, JBeaucaire, this macro is useful for me, but what about "Black border between C and L columns in transition between first and second page"?
  • Jul 16, 2009, 05:06 AM
    JBeaucaire

    Highlight cell C57:L57
    Press Ctrl-1
    Select Border
    Add the dark line at the TOP.
  • Jul 16, 2009, 03:38 PM
    Pajoooo
    No, NOT work.

    After

    Highlight cell C57:L57
    Press Ctrl-1
    Select Border
    Add the dark line at the TOP.

    Print Preview, Next

    Dark line is at the TOP, but at the top of second page.
  • Jul 17, 2009, 10:49 AM
    JBeaucaire

    Let's see what you got.
  • Jul 17, 2009, 04:48 PM
    Pajoooo
    Quote:

    Originally Posted by Pajoooo View Post
    No, NOT work.

    After

    Highlight cell C57:L57
    Press Ctrl-1
    Select Border
    Add the dark line at the TOP.

    Print Preview, Next

    Dark line is at the TOP, but at the top of second page.

    http://www.pttbn.com/66.jpg

    http://www.pttbn.com/77.jpg

    http://www.pttbn.com/88.jpg
  • Jul 17, 2009, 11:07 PM
    JBeaucaire

    Weird sheet you got going here, my friend... hehe.

    As long as the bottom of the sheet is the same as the bottom of the table, you're going to have an issue.

    Delete row 29, then insert a row at the bottom of the sheet, make sure the conditional formatting isn't in the added row, add the bold line at the top of the added row.
  • Jul 19, 2009, 01:34 PM
    Pajoooo

    That is IT.

    Thank You very much, JBeaucaire.

  • All times are GMT -7. The time now is 10:34 AM.