Need to paint Excel,but have blank column.

After operated the excel, the excel file have many blank column.Now need to print the excel, but I don't want these blank column, any way to delete them or not show when print? Thank u .

>>Now need to print the excel, but I don't want these blank column, any way to delete them or not show when print
Hi
You can delete or hide the column before you print the worksheet using WorksheetFunction.CountA, CountA() method , counts the number of cells that are not empty and the values within the list of arguments. You may refer to this code:
Sub PrintSheet()
Dim col As Long, lastCol As Long, r As Range
lastCol = ActiveSheet.UsedRange.Columns(ActiveSheet.UsedRange.Columns.Count).Column
For c = lastCol To 1 Step -1
If WorksheetFunction.CountA(Columns(c)) = 0 Then
Columns(c).EntireColumn.Hidden = True 'Hide the Column'
' Columns(c).Delete ' Delete the column
End If
Next
Application.ScreenUpdating = True
ActiveSheet.PrintOut
End Sub
CountA method
https://msdn.microsoft.com/EN-US/library/office/ff838049.aspx?f=255&MSPPError=-2147217396
Best Regards
Lan
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • Had main desk top computer crash and need to reinstall purchase but have installed on a lap top - how can I reinstall?

    Had main desk top computer crash and need to reinstall purchase but have installed on a lap top - how can I reinstall?

    You can activate your software on two computers.  If you need to install it on a third machine (because one of the first two crashed), then you need to https://helpx.adobe.com/contact.html to reset your activation count.
    If you just want to reinstall it on one of the first two machines, then just reinstall and re-activate it with your serial number.

  • I need to 'Remember Password' but have clicked 'Never Remember' I have been to security panel with no success.

    I need to 'Remember Password' but have clicked 'Never Remember Password'. I have accessed 'Security', but the website I need is not listed on 'exceptions'. Can anyone help? Thanks.

    Click this link --> https://support.mozilla.org/en-US/questions/912380?s=password&r=6&e=sph&as=s
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • HT1040 hi, i have created an ibook but have blank pages, how do i remove the excess pages?

    I have created a book but have siome blank pages how do i remove them?

    What version of iPhoto and of the OS?
    for iPhoto '11 - http://support.apple.com/kb/PH2448?viewlocale=en_US&locale=en_US
    LN

  • Help!! I have an old macbook 3,1 and I need to upgrade it but have no idea if it meets the specs and where I begin!! CAn anyone help me?

    How can I tell whether my macbook is able to be upgraded? It won't sync with my iphone because I"m running 10.5.8 but have no idea if it can be upgraded. please please help an ignorant apple user!!!

    The earliest MacBook 13" coreduo first year models from 1.83GHz processor on up, can use Snow Leopard 10.6.8; the computer should see a RAM upgrade to at least 2GB RAM (replace both chips) with the correct supported RAM kind, grade, specs, for the machine.
    The Snow Leopard retail DVD is (or was yesterday) available from the Apple Store online for about $20. If you look up your MacBook by Serial number from a site that can help do that, the information can then be used to find out more about the computer and what kind of update/upgrade may be possible. Hardware & software.
    With the serial number, found in System Profiler (about this mac... more info from apple menubar) you can copy paste that into a web page such as this  http://www.powerbookmedic.com/identify-mac-serial.php  for more details. Then move on to everymac.com and look up your exact series of MacBook in their database online. Or get Mactracker application as a download from http://mactracker.ca so you can see a variety of information in your computer about most Apple computers.
    For upgrading RAM yourself, see the MacBook area and your specific model at iFixit http://www.ifixit.com/Device/MacBook or check Apple Support for MacBook (your vintage) to see how they say to upgrade RAM.
    About your iPhone and support with Snow Leopard 10.6.8:
    http://manuals.info.apple.com/en_US/iphone_user_guide.pdf
    Good luck & happy computing!

  • Need two icloud accounts, but have only one itunes account

    My daughters iPhone 4 has to have work done and we were told by our phone provider that we had to back her phone up on iCloud before we
    get to our Apple store appt. The issue is, we both use the same iTunes account but I need to save our phones on two different iCloud accounts.
    I don't want my contacts and pictures on her phone nor do I want her stuff on mine. Was told it can be done but everthing I am seeing says it can't
    be done.
    Thanks,
    ACMyers

    You can set up a separate iCloud account for your daughter using a separate Apple ID and continue to use the same iTunes account.  The ID you use for iCloud does not need to be the same as the one you use for iCloud.
    Just go to Settings>iCloud on her phone and sign in with a separate ID, then turn her data syncing to On, as well as iCloud Backup.  As an addiditonal precaution, I would recommend she also import her photos to your computer for safekeeping if possible.  This does not involve syscing with iTunes, but instead is done as described in this article: http://support.apple.com/kb/HT4083.
    After backing up to iCloud, be sure to confirm the backup was successful before sending in her phone.  To do this, go to Settings>iCloud>Storage & Backup and scroll to the very bottom.  It will indicate the time of the last iCloud backup under Back Up Now if it was completed successfully.

  • Re: Report Painter Diff. formula in same column.

    Hi,
    I have some queries for report painter.
    I have 2 columns, A & B. I've created column C and the first 5 row I would like to have a set of formula such as A10 and for the same column, the row 6 to 10 from column B, I want to have formulate B5-10.
    My question is, whether it's posible to have 2 formula defined in the same column because value for each row may need to apply the formula differently.
    Thx & Rgds

    You can do this, although you need to split the columns into "Sections".  You also need to remove the column headers so they are not repeated between each section.
    They almost act similar to a page break, without actually breaking the column over pages.
    http://help.sap.com/saphelp_47X200/helpdata/EN/c7/50673ad016ec32e10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_47X200/helpdata/EN/5b/d22d8a43c611d182b30000e829fbfe/frameset.htm
    You can then have different calculated key figures within the same column.
    To amend sections, go to Formatting > Section Overview/Section Layout.

  • I need to convert PDF to Excel, however, columns and tabs make many merged cells and many blank columns. In addition to not separate the columns correctly, I see many not separate lines together in the same cell. I'm even thinking that Adobe Acrobat Pro D

    I need to convert PDF to Excel, however, columns and tabs make many merged cells and many blank columns. In addition to not separate the columns correctly, I see many not separate lines together in the same cell. I'm even thinking that Adobe Acrobat Pro DC has limitations. There is no way to define what points in columns to force break column? Nor create many columns that are useless? How does text to column in Excel, fixed size when we import text, and define where the breaks have columns?
    Google Tradutor para empresas:Google Toolkit de tradução para appsTradutor de sitesGlobal Market Finder
    Desativar tradução instantâneaSobre o Google TradutorCelularComunidadePrivacidade e TermosAjudaEnviar feedback

    PDF does not contain columns, rows, formats, styles, or other aspects of word processing or spreadsheet file formats.
    This is because PDF is decidedly not a word processing or spreadsheet file format or something "like" one of those.
    (see ISO 32000 for what PDF "is")
    What can optimize the export of PDF page content is to start with a well-formed tagged PDF (ISO 14289-1, PDF/UA-1 compliant).
    Without that export is what it is and one performs whatever content cleanup is needed using the native application for the export file (MS Word or Excel).
    Be well...

  • I have a numbers spreadsheet for tracking company data.  I want to copy the format of the spreadsheet (rows, columns,and formulas) but have all of the data fields be blank for the new year.  How do I do that?

    I have a numbers spreadsheet for tracking company data.  I want to copy the format of the spreadsheet (rows, columns,and formulas) but have all of the data fields be blank for the new year.  How do I do that?

    click and hold on one cell, then drag to select the range, then release, then type the delete key.  Only inlude cells in the range you do not want to keey the contents of the cell.  You can remove one-off cells by holding the command key and clicking cells to add or remove as needed.
    You can download the Numbers users guide here:
    http://support.apple.com/manuals/#productivitysoftware

  • Ok, im new to numbers but i cant work this one out. In column A is an average of hours worked. I have 4 columns. A and B have different values. Column C is an average of hours worked. When column C is less then 8 i need column D to equal column a

    Ok, im new to numbers but i cant work this one out. I have 4 columns. A and B have different values. Column C is an average of hours worked. When column C is less then 8 i need column D to equal column A. When column C is equal or greater then 8 i need column D to equal the sum of A and B.

    Hi Lucas,
    Try this:
    Formula in D2 (and Fill Down) =IF(C2<8, A2,A2+B2)
    The IF function follows the logic of if, then, else.
    IF(this is true, then do this, else do that)
    If it is raining, then stay at home, else hold a picnic .
    Regards,
    Ian.

  • I want to write a script or Automator workflow/app that emails a random shortcut of the day to three recipients. The source is from an Excel spreadsheet. One column is the shortcut, and the second column is the definition. Anyone have experience?

    I want to write a script or Automator workflow/app that automatically emails a random shortcut of the day to three recipients. The source is from an Excel spreadsheet. One column is the shortcut, and the second column is the definition. Anyone have similar experience and know that this would work?

    I have had a first stab at the script, below.  It uses a file to store the shortcuts and command [descriptions].  You should be able to see from the script annotations how to add a new one.  (I populated 1-4 with real data, but got lazy after that, so you have a few placeholders to work with first.
    As I have noted, once you are happy that you have all the data in the file, you can comment out part of the script for ongoing use.  (BTW, my reluctance to use Excel is that I don't currently have it installed and I don't want to offer wrong advice.  If you have Numbers, I do have that and could probably modify to work with a spreadsheet from there.  This might be especially useful if you have the data already sitting in Excel.)
    A few things came-up whilist I was writing the script:
    1.     Currently, all recipients will not only get the same tip at the same time, but they will see the names and email addresses of the others who receive them.  It is possible to modify this.
    2.     I have added a property gRandomCheck which keeps track of which shortcut has already been used (since the last time the script was compiled.  This will prevent the same tip being sent more than once.    When all tips have been sent once, the script will alert you and not send anything until reset.  It does not check on a per-addressee basis (which would be a refinement).  (If you add a new addressee at this stage, the whole process will start again, and you may not really want this to be the behaviour.)
    3.     The way that I have built the list, commandList, is deliberately cumbersome - it's for the sake of clarity.  If you prefer, you can construct the whole list as {{shortcut:"X", command:"X"}, {shortcut:"Y", command:"Y"}}
    Have a look - I am sure you will have questions!
    SCRIPT STARTS HERE  Paste the following lines (thru the end) into a new AppleScript Editor document and press RUN
    --The property gRandomCheck persists between runs and is used to stop sending the same hint twice.
    property gRandomCheck : {}
    --I am defining a file on the desktop.  It doesn't have to be in this location
    set theFolder to path to desktop
    set commandFile to (theFolder as text) & "CommandFile.csv"
    --(* Unless you need to change the file contents you do not need to write to it each time.  Remove the "--" on this line and before the asterisk about 18 lines below
    --Follow this format and enter as many records as you like on a new line - each with a unique name
    set record1 to {shortcut:"Z", command:"Undo"}
    set record2 to {shortcut:"R", command:"Record"}
    set record3 to {shortcut:"⇧R", command:"Record Toggle"}
    set record4 to {shortcut:"⌘.", command:"Discard Recording & Return to Last Play Position"}
    set record5 to {shortcut:"X", command:"x"}
    set record6 to {shortcut:"X", command:"x"}
    set record7 to {shortcut:"X", command:"x"}
    set record8 to {shortcut:"X", command:"x"}
    set record9 to {shortcut:"X", command:"x"}
    set record10 to {shortcut:"X", command:"x"}
    set record11 to {shortcut:"X", command:"x"}
    set record12 to {shortcut:"X", command:"x"}
    set record13 to {shortcut:"X", command:"x"}
    --Make sure you add the record name before randomCheck:
    set commandList to {record1, record2, record3, record4, record5, record6, record7, record8, record9, record10, record11, record12, record13}
    --This part writes the above records to the file each time.
    set fileRef to open for access commandFile with write permission
    set eof of fileRef to 0
    write commandList to fileRef starting at eof as list
    close access fileRef
    --remove "--" here to stop writing (see above)*)
    --This reads from the file
    set fileRef to open for access commandFile with write permission
    set commandList to read fileRef as list
    close access fileRef
    --Here's where the random record is chosen
    set selected to 0
    if (count of gRandomCheck) is not (count of commandList) then
              repeat
                        set selected to (random number from 1 to (count of commandList))
                        if selected is not in gRandomCheck then
                                  set gRandomCheck to gRandomCheck & selected
                                  exit repeat
                        end if
              end repeat
    else
              display dialog "You have sent all shortcuts to all recipients once.  Recompile to reset"
              return
    end if
    --This is setting-up the format of the mail contents
    set messageText to ("Shortcut: " & shortcut of record selected of commandList & return & "Command: " & command of record selected of commandList)
    tell application "Mail"
      --When you're ready to use, you probably will not want Mail popping to the front, so add "--" before activate
      activate
      --You can change the subject of the message here.  You can also set visible:true to visible:false when you are happy all is working OK
              set theMessage to (make new outgoing message with properties {visible:true, subject:"Today's Logic Pro Shortcut", content:messageText})
              tell theMessage
      --You can add new recipients here.  Just add a new line.  Modify the names and addresses here to real ones
                        make new to recipient with properties {name:"Fred Smith", address:"[email protected]"}
                        make new to recipient with properties {name:"John Smith", address:"[email protected]"}
      --When you are ready to start sending, remove the dashes before "send" below
      --send
              end tell
    end tell

  • HT2905 Most all of my 1700 songs have been duplicated in iTunes. I have downloaded the instructions how to delete the duplicates but it says "sort by the date you added" and i have no column that says that. I am running windows xp.

    Most all of my 1700 songs have been duplicated in iTunes. I have downloaded the instructions how to delete the duplicates but it says "sort by the date you added" and i have no column that says that. I am running windows xp.

    Apple's official advice is here... HT2905 - How to find and remove duplicate items in your iTunes library. It is a manual process and the article fails to explain some of the potential pitfalls.
    Use Shift > View > Show Exact Duplicate Items to display duplicates as this is normally a more useful selection. You need to manually select all but one of each group to remove. Sorting the list by Date Added may make it easier to select the appropriate tracks, however this works best when performed immediately after the dupes have been created.  If you have multiple entries in iTunes connected to the same file on the hard drive then don't send to the recycle bin.
    Use my DeDuper script if you're not sure, don't want to do it by hand, or want to preserve ratings, play counts and playlist membership. See this thread for background and please take note of the warning to backup your library before deduping.
    (If you don't see the menu bar press ALT to show it temporarily or CTRL+B to keep it displayed)
    tt2

  • Column has values in RSA3 but comes blank in PSA

    Hi All,
    I have added some code for datasource 0REFX_4 and extracting data into an ODS. My issue is that the column 0RECONTRACT has values in RSA3 but comes blank in PSA/ODS.
    Another funny thing is that when I do selection with company code in infopackage and extract, the column 0RECONTRACT gets filled!! It doesn't get filled only when i extarct without selection. Can any of you help me resolve this?
    -Narayan

    Narayan, so strange ! If I undertand, In RSA3 with or without selection, the column 0RECONTRACT gets filled. The problem is from BW (Infopackage). You can make a test:
    In you code to select the value to 0RECONTRACT (I don´t know the R/3 field), you put a "loop", in the start of exit function. Start Infopackage and goes to R/3 via SM50 transaction em DEBUG exit.
    Loop like this:
    v_stop = 1.
    while v_stop = 1.
      v_stop = 1.
    endwhile.
    Look the values from table C_T_DATA. Maybe the field that you use to select 0RECONTRACT is blank, when you start the load from BW. I´ve tried to find some SAP Notes, but nothing.
    Hugs,
    Marcelo

  • I have a column where I have implemented writeback, its working fine. On top of this I need to show 0 as No and 1 as yes in our report, that is also done. Now I want to enter Yes in a column where it was no and I want database table to get update with 1.

    I have a column where I have implemented writeback, its working fine. On top of this I need to show 0 as No and 1 as yes in our report, that is also done. Now I want to enter Yes in a column where it was no and I want database table to get update with 1. I am not sure how to do it. SOmeone please help me out.

    Hi ,
    In your write back XML  try the below  query insert
    INSERT INTO TABLE_XYZ (attribute1)  values (SELECT CASE  WHEN @{C1}=’Yes’ then 1 when @{C1}=’No’ then 0 else null end from dual)
    Regards
    Rajagopal

  • I need to connect a computer monitor to my MacBook Pro but have found that when using the mini display port to VGA adaptor the screen display on my macbook is very small font. Please what do I do to correct this?

    I need to connect a computer monitor to my mac book pro, using a mini display port to VGA adaptor. But have experienced a drastic reduction in font size on my
    Mac screen even before I have managed to check the result on the monitor screen. Please how do I compensate for this and restore my mac screen appearance?
    Many Thanks Alangium in uk

    Hi alangium,
    Welcome to the Support Communities!
    Resetting your computer's PRAM should restore your Macbook Pro's screen appearance.
    OS X Mavericks: Reset your computer’s PRAM
    http://support.apple.com/kb/ph14222
    This article may provide some information about your Mini DisplayPort to AVI adapter.  Have you tried to connect a different VGA monitor to your Macbook to see if you get the same results?
    Apple Mini DisplayPort adapters: Frequently asked questions (FAQ)
    http://support.apple.com/kb/HT3382
    18. What is the maximum resolution available for use with the Apple Mini DisplayPort to VGA adapter?
    The resolution available with the Apple Mini DisplayPort to VGA Adapter is 1920 x 1200. VGA displays that use higher refresh rates (such as 85 Hz) at resolutions of 1600 x 1200 or greater may not generate video properly until you lower the refresh rate.
    Apple computers: Troubleshooting issues with video on internal or external displays
    http://support.apple.com/kb/HT1573#5
    How can I detect displays?
    If the detect displays option is not available, hold down the Option key while you are in the Display pane.
    How do I select additional resolutions on my display?
    You can use the Display pane of System Preferences to specify how your display works. Not all options appear for all display models. By default the best resolution for your display will already be selected in System Preferences.
    To select a different resolution, use the Scaled option. Some additional resolutions may be available when you hold the Option button.
    I hope this information helps ....
    - Judy

Maybe you are looking for