excel

Double nested IF statement formula in Excel

淺唱寂寞╮ 提交于 2021-02-08 10:26:19
问题 Good morning, I would like to set a multiple if statement in Excel. In row 8 you can see the following formula, which gives an answer in column Q. The answer based on this nested formula is Yes or No. In row 13 all the cells are empty. Because the nested formula has been dragged down it still shows "No". I was trying to write some double nested IF statement for this, which could cover the situation when the cells are empty and the Q column can come empty as well as a result. =IF(OR(M9=" ",OR

Array processing VBA

烈酒焚心 提交于 2021-02-08 10:22:26
问题 i'm prototyping a solution for a tidious task using vba because my company's security only allows this method, can't use python nor anything else. i have a table of 5K+ rows and about 15 columns, and i want to process it removing specific columns based on a search criteria. so here's my code so far Sub RstCr() Dim Sh As Worksheet Dim Ar() As Variant Dim Arr As Variant Dim i As Integer Dim j As Integer Dim k As Integer Dim p As Integer Set Sh = Sheets("Sheet1") Sh.Cells(1, 1).CurrentRegion

Dynamically Create collection of Collections VBA

爱⌒轻易说出口 提交于 2021-02-08 10:21:08
问题 I'm trying to dynamically create a collection with collections nested within. So far, I've been able to create a nested collection by typing everything (see below). However, I have a ( horrible ) spreadsheet that has a repeating set of 17 questions hundreds of times in one column, and the answers in the next column. I'm trying to get the answer to each question as an item, and the question itself as the index. The unique set of the 17 questions will be a collection within a collection of the

How can I use input from a TextBox in a PowerQuery Formula?

筅森魡賤 提交于 2021-02-08 10:20:30
问题 I would like to use a PowerQuery Formula which includes input from a text box like Json.Document(Web.Contents("https://thesite.com/api/widgets", [Query=[name=TextBoxName.Text]])) But I get this error Expression.Error: The import TextBoxName.Text matches no exports. Did you miss a module reference? How do I use TextBoxName.Text as a parameter in my query? 回答1: Does it have to be a text box? Put the value in an Excel table instead and call that table "Parameters". Then write a function that

How can I use input from a TextBox in a PowerQuery Formula?

╄→尐↘猪︶ㄣ 提交于 2021-02-08 10:19:22
问题 I would like to use a PowerQuery Formula which includes input from a text box like Json.Document(Web.Contents("https://thesite.com/api/widgets", [Query=[name=TextBoxName.Text]])) But I get this error Expression.Error: The import TextBoxName.Text matches no exports. Did you miss a module reference? How do I use TextBoxName.Text as a parameter in my query? 回答1: Does it have to be a text box? Put the value in an Excel table instead and call that table "Parameters". Then write a function that

How to To Loop through cells in a column, and to find the latest date of the list in Excel VBA

自作多情 提交于 2021-02-08 10:18:49
问题 Actual work to loop through the Column A which has same value of with certain range, with that range have to check the latest date with the comment in Column B and print the comment with date in Column C kindly help me to find the solution for this problem.. Or Guide to find the solution for this problem... Kindly check the Screenshot for clear information.. Thanks in Advance Experts 回答1: Loops are probably the most powerful things is all computer programming topics. Please see the examples

Copy data from rows in different column order

自古美人都是妖i 提交于 2021-02-08 10:18:10
问题 I need to copy rows of data from one worksheet to another. But i have to change the order of the columns. For example Data from A,B,C in columns E,L,J and so on. I already worked on a solution and the code below hopefully shows what i want to do. Is there a cleaner way to copy the data? My version is quite slow while executing. How can i copy the data in the target worksheet without empty rows? Sub KopieZeilenUmkehren() Dim Zeile As Long Dim ZeileMax As Long Dim n As Long With Sheets("Artikel

Excel cubevalue memberexpression

岁酱吖の 提交于 2021-02-08 10:16:31
问题 I am using the CubeValue function in Excel Powerpivot (2013) and would like to know if it is possible to use operators in the MemberExpression, particularly to retrieve values less than or greater than, e.g: =CUBEVALUE("PowerPivot Data","[Measures].[CountofServiceID]","[Data].[ReportMonthNumber].&[ < "&$P$4&"]") The syntax above (<) is incorrect and I would like to know how to do this? Thanks 回答1: In general, I find it is easier to break cube function formulas up and use cubevalue to simply

Copy all named ranges to another workbook

蓝咒 提交于 2021-02-08 10:13:00
问题 So I've been fussing with the Microsoft Support answer to this question but their code is simply not working. I'm confused about how they do not define x, or maybe x always equals a variable in VBA? Anyway, I am trying to copy all named ranges in one workbook and bring them over to another workbook. I have to do this for 50-odd workbooks and there are 30-40 named ranges in the base workbook. I really do not want to have to copy-paste these buggers manually. Here's the code they gave for this

How to make the Combobox item list dynamic?

一个人想着一个人 提交于 2021-02-08 10:12:53
问题 I am using a 'Generate' button on my worksheet. When I click on the button, a popup (form) come, which contains two comboboxes. Basis the selection in the first combobox, the second combobox option list is populated. For the first combobox, when I hardcode the item values it works fine. The form code is as follows: Private Sub UserForm_Initialize() With ComboBox_DL .AddItem "DL1" .AddItem "DL2" End With End Sub I tried to make this item list dynamic by fetching the combobox item values from a