excel-2007

Macro works in Excel 2003, not in 2007

对着背影说爱祢 提交于 2019-12-13 09:35:18
问题 I have a macro that exports a workbook, which works perfectly fine (and has for years) under Excel 2003. However, it doesn't work on any machine with 2007 or 2010. It runs and opens the Save As box, however no matter what I type, when I click ok, it just sits there. Clicking Ok to save doesn't do anything. Can someone help please? The code: Sub ExportReports() Dim fdialog As Office.FileDialog Dim varfile As String Static varfile_name As String Dim curr_wb_name As String Dim num_sheets As

Add headers to column data using a macro

懵懂的女人 提交于 2019-12-13 08:32:40
问题 I'm in need of a simple macro that adds the column header values to the contents in the columns of a spreadsheet (preferably values that are specified). So if possible, I'd like to specify the column names in VBA (Col1="Location") so that the macro is only applied to specific columns. Example: If I've specified, "Location" as a column header the macro should look for and A1 has "Location" as the header, then everything in A needs, "Location: " added to the front of it. Basically, whatever the

Dynamic list and blank space filtering

可紊 提交于 2019-12-13 08:27:55
问题 I have a list which is a combination of two cells for records. For example something like A1&B2 . Sometimes this is not filled however. The formula below sees that it has A1&B2 in the field so regardless it thinks it's fields even though the field would be considered "" . =OFFSET(CCS_Error_Tracker!$A$5,0,0,COUNTA(CCS_Error_Tracker!$A:$A),1) Is there any way this could be configured truly to look for blank spaces? 回答1: I think this is what you are looking for: =$A$5:INDEX($A$5:$A$1048576,ROWS(

How would I write this equation into Excel (-((N)/2)), -((N-1)/2)), - ((N-2)/2)),…,0,…,((N-2)/2), ((N-1)/2), ((N)/2)) [closed]

戏子无情 提交于 2019-12-13 08:02:19
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 years ago . I need to input an equation into excel, I have set a cell to equal N and then I need another cell to hold the information (-((N)/2)), -((N-1)/2)), - ((N-2)/2)),...,0,...,((N-2)/2), ((N-1)/2), ((N)/2)) 回答1: You can use array formula. Suppose, your value N is in C4 cell. Select range in one column

Importing DBF files to MS Excel 2007

喜你入骨 提交于 2019-12-13 07:59:55
问题 I am trying to import DBF file to Excel. But after I am importing it, it doesnt show data in proper format. I guess there is some problem with encoding. I tried using different encodings in "File Origin" option. Could anybody guide me in this matter.? Thanks 回答1: It is an encoding issue indeed. Windows "translates" your DBF characters to the default system code page when opening the file. There are ways around if you know your original code page but it is not for the faint hearted. 回答2: Try

Delete Certain Characters in Excel 2010

戏子无情 提交于 2019-12-13 07:37:18
问题 I have ~4000 records of data in Excel 2010 that as below: QW3-WE-2232-322-A-2 WETE-33-3REE-33-WEWE-3 DEE-3YED-3432-DXSDDD-3FESE-2 343-34SE-34323-AWBE-3 ABDC-343-3THYT-2 I want the data to look like this where everything after the last dash is deleted. QW3-WE-2232-322-A WETE-33-3REE-33-WEWE DEE-3YED-3432-DXSDDD-3FESE 343-34SE-34323-AWBE ABDC-343-3THYT Was wondering if there was an easy way to do this Excel? 回答1: Answering the original question where at most two "-" separators occur: =LEFT(A1

How do I change the file print setting on Excel to use VBA to print several pages when printing the workbook

 ̄綄美尐妖づ 提交于 2019-12-13 07:36:26
问题 I would like to change the file print setting in Excel to go directly to VBA and print some of the 26 worksheets while printing the workbook. Most of the active worksheets should print, but a few of the worksheets should not print. The workbook is a template and the number of active and printed worksheets will change with each new workbook created. Lastly, should the VBA code go in the "ThisWorkbook" section? 回答1: I would use something like Sub PrintSheets () Dim Wks1 as Worksheet: set Wks1

vlookup doesn't work

放肆的年华 提交于 2019-12-13 07:29:22
问题 http://s3.amazonaws.com/alexa-static/top-1m.csv.zip on that Alexa domain ranking spreadsheet (top 1 million domains in the world) A column contains domain ranking, B column contains domain name (for those not familiar) On a D column, I put =VLOOKUP("dog",A1:B1000001,1,TRUE) and it returns #N/A How come Vlookup is not working ? Using Excel 2007, Vista. 回答1: From VLOOKUP doctumentation The V in VLOOKUP stands for vertical. Use VLOOKUP instead of HLOOKUP when your comparison values are located

Cross Compatibility of Millisecond Timer Resolution in Excel VBA

自古美人都是妖i 提交于 2019-12-13 06:07:31
问题 I would like to get fractional timer resolution in an Excel VBA project that has to be compatible with Windows Excel 2007 and Mac OS Excel 2011. Ive found a method in windows utilizing sleep from kernel32.dll and a method on Mac OS using MacScript("GetMilliSec"). I currently have limited access to a Mac, so I am not able to test this out directly right now. If I declare Sleep like this: Private Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long) Will an error be raised when

Inserted image fails to display when sheet is copied to another workbook in Excel 2007

我只是一个虾纸丫 提交于 2019-12-13 05:39:31
问题 In workbook A I have a macro that opens read-only workbook B, copies 4 sheets into workbook A, then closes workbook B. One of the copied sheets contains two inserted .PNG images but these images fail to display on the sheet once it's copied over to workbook A. After I added the network folder workbook B resides in to the Trust Center settings and ticked the 'Cut, copy, sort with parent cells' option under Advanced options, I could see the image outlines with the error message "The image canot