excel-2013

Pull data from Redshift

独自空忆成欢 提交于 2019-12-25 04:27:30
问题 We want to pull data from Redshift database into SQL Server. Currently, we are using SQL Workbench to analyze Redshift database. We referred the following link - Connect Your Cluster By using SQL Workbench Here we used - RedshiftJDBC41-1.1.17.1017 driver to connect. Now we want to push this data to DWH in SQL Server 2016. So what is the best way to accomplish this? There is not much information on net on how to pull data from Redshift. Can we have SSIS component or something in SSDT/SSIS2015

Creating Pivot Table with Distinct Count using VBA

倾然丶 夕夏残阳落幕 提交于 2019-12-24 10:48:46
问题 I am trying to create a pivot table using Excel 2013 VBA with DISTINCT COUNT as a value field. I understand that if you create the pivot table manually, you have to check the "Add this data to the Data Model" checkbox in order to have the distinct count option for the value pivotfield, but I have no idea how to translate this into VBA code. I've tried creating the pivot table with xlCount as the valuue pivotfield and it worked fine, but for xlDistinctCount it does not work Set wb =

How to return row value that meets two criteria in Excel

不问归期 提交于 2019-12-24 05:12:03
问题 I have an excel spreadsheet to keep track of project activities. In Column A I have the Project Name and it repeats several times because the same project has several activities. In Column B I have the Activities related to that project. In Column C I have the % Complete of each activity. What I would like to accomplish is: in Column D return the first Activity of the Project that is not 100%. Here is a picture of what I would like to accomplish: I was trying this formula with no luck: =INDEX

Excel - How to create button upon Workbook_Open event

早过忘川 提交于 2019-12-24 03:51:10
问题 I'm trying to make an Excel Add-In to create a simple button when any workbook is opened, but I'm getting Object variable or With Block variable not set I think this is happening because technically there is no 'ActiveWorkbook' yet. First thing I want to do is delete any buttons currently on the sheet. Then I want to place a button. Anyone know how to make that happen? Code Private Sub Workbook_Open() ActiveWorkbook.ActiveSheet.Buttons.Delete Dim CommandButton As Button Set CommandButton =

Setting combobox values on initialisation and change of other comboboxes

痴心易碎 提交于 2019-12-24 00:53:53
问题 (EDIT: To clarify, I'm running Excel 2013, so Microsoft's date picker isn't available.) I'm trying to code a simple date picker - it'll be tidier when it's done, it's just big for simplicity while I build it - and everything populates as it should: Me.Combo_Year.List = wsLU.Range("Date_Years").Value Me.Combo_Month.List = wsLU.Range("Date_Months").Value Me.Combo_Day.List = wsLU.Range("Date_Days31").Value However, there are two instances where I'd like to set default values for the year, month

Group By With VBA

自古美人都是妖i 提交于 2019-12-23 05:30:38
问题 I have a worksheet that has a header row, and I want to group the rows using VBA. I have attempted this syntax Sub GroupItTogether() Dim rLastCell As Range Set rLastCell = ActiveSheet.Cells.Find(What:="*", After:=.Cells(1, 1), _ LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByRows, SearchDirection:=xlPrevious, MatchCase:=False) Range("A2" & rLastCell).Select Selection.Rows.Group ActiveSheet.Outline.ShowLevels RowLevels:=1 End Sub However, this will produce an error of: Invalid or

Excel VBA Looping formula to change Range

社会主义新天地 提交于 2019-12-23 04:50:33
问题 I've written a code to manipulate data in L9 : DC9 , But now I need to repeat this for L10 : DC10 , L11 : DC11 and etc.. I've tried a For Next loop replacing the value in the range with Li:DCi and specifying ( i ) as 9 to 30 but I get an error. How can I make a loop for this function? My current version of Excel is 2013 回答1: What you are looking for is a syntax like this Sub LoopRows() Dim i As Integer For i = 9 To 30 ActiveSheet.Range("L" & i & ":DC" & i).Interior.Color = RGB(100, 100, 100)

Using COUNTIFS formulas when linking worksheets

前提是你 提交于 2019-12-23 01:54:20
问题 I want to be as detailed as possible. So Let me provide you with the look of my spreadsheet Column H Column Q Row 11 YES Win Row 12 NO Win Row 13 YES Loss ... ... Row 61 YES Win The calculation that I used to give me a count of "Winners" is =COUNTIFS(H11:H61,"YES",Q11:Q61,"Win") and the one for "Losses" is =COUNTIFS(H11:H61,"YES",Q11:Q61,"Loss") - seems to be working well. However, this calculation is on sheet Input. I would like to have this calculation done on a totally different sheet

Calculating Standard Deviation with If in Excel

我们两清 提交于 2019-12-22 05:02:09
问题 I have a dataset with two columns. One label and one number. Using sumif and countif , I managed to calculate the average of each label in groups. Now, I am trying to do the same with Standard Deviation but I have a problem: =STDEV.P(IF($A$2:$A$625129=F4,$B$2:$B$625129)) This is the formula I use, where A column is the column with the labels, B with the numbers and F4 is one of the label groups. The result is 0. I do the same for every label group and all of them are 0. Any idea what is wrong

Creating a “color scale” using vba (avoiding conditional formatting)

半腔热情 提交于 2019-12-21 05:47:15
问题 I'm looking for a way to apply a color scale to a set of cells via VBA code but not by applying some conditional formatting... I want to apply them as static colors (InteriorColor) I've searched plenty of excel sites, google and stackoverflow and found nothing :( For my situation if you look at the following picture: You can see I've given it a color scale, in this example though I have done the color scale via Conditional formatting. I want to create the color scale via VBA but it must avoid