Populating A Multi-dimensional Array
I have a spreadsheet which I will be adding to over time. I need a macro that will look for the last 10 rows and then pull together a summary table based on data from several of the columns on each of those rows.
I've tried to go about this by using an array. The array will always be the same size (it will always be 10 by 11, i.e. EngineArray(10,11)-basically the same size as my summary table). I've also set Option Base 1.
What I’ve got so far is below. It isn’t working properly though. To start with I was getting ‘type mismatch errors’. Now instead of reading the numbers from the selected cells into the array, it just changes all the cells I’m trying to read from to ‘TRUE’?
View Complete Thread with Replies
Sponsored Links:
Related Forum Messages:
Summing In A Multi Dimensional Array
I've created an array that is 60 pairs of cells wide. Each row in the array represents a different account. The 60 pairs of cells contain up to 60 payments in a payment stream. The first cell of each pair may contain an amount of interest to be paid, or zero if the time band in which it was/will be paid is not within the time range that I'm evaluating. The second cell of each pair may contain a number between 1 and 10 representing the time band in which the interest will be paid, or zero if the payment date falls outside of the time bands. I need to be able to sum the interest to be paid in each time band for all of the accounts in my database. Is there an Excel function that I could use or will I need to write some VBA code to loop through each row?
View Replies!
View Related
Multi-dimensional Array Solution
I am currently using a macro which highlights keywords and associated page views from an array in my website stats spreadsheet. Now I need to take it to the next level: I want to use a multi-dimensional array to pull out any keywords that are duplicated, and display them at the top of my spreadsheet with the totaled page views next to them in a different color (red). Here is my existing Keyword highlighting Sub Highlight_Keywords() Dim vntWords As Variant Dim lngIndex As Long Dim rngFind As Range Dim strFirstAddress As String Dim lngPos As Long
View Replies!
View Related
Evaluate Multi-Dimensional Array Matrix
I'm trying to use VBA to do some matrix processing. I have successfully done matrix processing in the spreadsheet, but I'm looking to port the logic into VBA to more easily reuse central formulas and reduce the amount of code in the spreadsheet. The function shown below works. I had to hack around the variable declarations to eliminate processing/compile errors but it seems to function (no pun intended). While debugging I noticed that this function would seem to get called 4 times. I do have other modules running, although I don't think any other modules are affecting this. After some input from shg, I updated the variable declarations, but I'm getting an "Overflow" error reported. Sometimes (not always) a divide by zero also pops up. I do have the Msgbox for errors at the end, I haven't tried removing that part to see if the error reporting vanishes. I'm not sure 'hiding' error alerts is the best thing to do anyway...
View Replies!
View Related
Multi-dimensional Array Not Showing In Listbox
I have made the function below to return a variant multidimensional array. I pass the function an array of folder paths that I wish to search through looking at subfolders within that path where their name matches a search string that I pass to the function. eg., it will find a folder named "Catnap" if you pass the string searching for as "Cat*". The size of the array it builds depends on how many folders it finds that match the search string and so needs to be built dynamically. Hence, I believe it builds a 2 dimensional array horizontally and I transpose it at the end of the function. In each element I put the folder name that was found in the first dimension and the path to that folder in its second dimension. I have a 2 column listbox on a form that I set this array to. eg., Me.ListBox1.List = DirPaths("C:","Cat*",vbDirectory,100) This works fine and shows a list of folder items found by folder and path in the two columns of the listbox if there is greater than 1 search found. However, when the search only finds 1 then the listbox shows the folder name with the folder path in row 2 of the list box. (See below).....
View Replies!
View Related
Fill Range From Multi-dimensional Array
I searched and found a few posts about transposing arrays into a range of cells, but none of them seemed to solve my problem. So, my problem is, I have a .Net assembly which provides various functions to allow Excel to access our Oracle DB stored procedures/tables, etc. This assembly is exposed via COM Interop. I call the GetSPINTypes() method, which returns me a list of type pairs (ID, Name), in a CSV string format. I split the CSV into rows, and then put each row into a 2-dimensional array. I then need to dump that array into one of my sheets in Excel, so I try to do the usual Range.Value = Array, but this sometimes tells me there is a type mismatch, and most times just doesn't fill the range. I've checked my arrays in the watch window, and they have definitely been filled in correctly, the values just don't appear when they are put into the sheet. See the code I'm using below:......
View Replies!
View Related
Join Dynamic Multi-dimensional Array
the built in "Join" function can join all elements of a 1-dimensional array into a string with delimiter. Now, how do I do that with multi-dimensional array if I just want to join 1 dimension of it. For instance, I have: m = 10 n = 20 Redim my(m, n) 'assign values to array here... 'I want to join, say, my(5, 0 to n) only 'How to do that without declaring a new 1 dimension array? Also, I want to write a join sub/function to do the above for n-dimensional array, do I need to write each one for every number of dimension (1 sub for 2-dimension, 1 sub for 3 dimension, etc.)?
View Replies!
View Related
Fill & Rearrange Multi-dimensional Array From Another
I've got the folowing array's date1>company1>price >Company2>price >company3>price >enz Date2>company1>price >company2>price >enz enz. But these are not the array's that i need for a correlation that i want to make. Is it possible to transform the array's above to an array such as: Company>date1>price >date2>price >date3>price >enz
View Replies!
View Related
Creating A 2-dimensional Array From A 1-dimensional List
I've been a lurker on this forum for a long while and it's always been able to provide me with lots of excel tips, and for that I am grateful! But this time I have a question that I can't find the answer to here, or anywhere else on the web after a few hours of looking. As a note, I'm not very experienced with Excel, probably somewhere between novice and intermediate. What I need to create is a 2-dimensional array of data. The vertical (y-axis) are the tools, and the horizontal (x-axis) are the jobs. Where the y-axis and the x-axis intersect, will be the quantity of tools needed for that specific job. There are almost 1500 tools, and 100 jobs.
View Replies!
View Related
Checking If Variable Is Multi-dimensional
Is there a quick way to check if a variable is an array or multi-dimensional? I am trying to send variables to a sub to print to excel but I am sending mixed variables - some are one dimension, some are two dimensional. Here is what I am using: Private Sub Send(Item As Variant, Top As Integer, ToSheet As String, Row As Integer, Column As Integer) 'Sends values to Excel ' Loop counter Dim i As Integer For i = 0 To Top - 1 ActiveWorkbook. Sheets(ToSheet). Cells(i + Row, Column).Value = Item(i) Next End Sub I suppose I could set up a second routine to handle one dimensional variables, but I thought I would ask the pros -
View Replies!
View Related
Lookup Values From A Multi Dimensional Table / Data Sheet
I have a sheet that has to look up value on a report from a sheet sheet that has more than value. Ex) On the report I have values 123A and 1234A On the data tab I have table that has. Ref Tot Value Desc Value1 Value2 Value3 1 123A Widgets 1 2 3 2 123A Widgets 4 5 6 Ref Tot Value Desc Value1 Value2 Value3 1 123B Nuts 7 8 9 5 123B Nuts 1 3 5 Ref Tot Value Desc Value1 Value2 Value3 7 1234A Bolts 2 4 6 11 1234A Bolts 3 5 8 So the report need find the values for Value 1, 2, 3 on where the value matches the data tab.
View Replies!
View Related
Interpolate Two-dimensional Array
With a known X and Y, trying to solve for Z from a table. ie: IF a variable X is defined across a row, another variable Y defined down a column, the data field Z fills in-between. What do I need to use to interpolate for both X and Y to solve for Z?
View Replies!
View Related
Function For 2-dimensional Array
I am trying to write a public function that fills a table for a 2-dimensional array and am having trouble with my named ranges. The x-axis is based on years (range F2:O2) and the y-axis is a q_factor (range E3:E23) so the data range would be (F3:O23. The following outlines my logic: Public Function bondValue(years As Range, q_factor As Range, z As Double) Dim nRow As Long, nCol As Long Dim bondPort As Range nRow = q_factor.Rows.Count nCol = years.Columns.Count sumTau = 0
View Replies!
View Related
Fill ComboBox With 2 Dimensional Array
I can set up a 2 dimensional array by using array = Workbooks("Workbook.xls").Worksheets("Data"). Range("D_all") as range D-all contains 2 columns and 20 rows I can send that list to a combo box by using Me.ComboBox1.List() = array If I have ColumnCount set to 2 then both columns will be listed If I have ColumnCount set to 1 then the 1st part of the array will be listed But how do I list just the 2nd part of the array
View Replies!
View Related
Data Type Of Coordinates Of 2-dimensional Array
I have a big array "DataArray" and want to access it: For i = 1 To 4 variable = DataArray(SourceArray(i)) Next i "DataArray" has two dimensions, so SourceArray has to consist of data like this: SourceArray(1) = 1,2 sourceArray(2) = 2,4 etc What data type does Sourcearray have to be? Integer doesnt seem to work, and DataArray doesnt like a string as coordinates. I have a workaround with two different arrays of integer for x and y coordinates, but this cannot be it.
View Replies!
View Related
Populating Array From Listbox
I am in the process of trying to load an array from items in a list box. The variable "sProd" is the value from the listbox and I want to populate the value in the array with the listbox value so ultimately I can generate SQL on the fly. Lets say 3 values are in the listbox and my array is loaded, I would then trnaspose the array a create a SQL statement like: SELECT PVT_STAGE_SOURCE_SSv2.[pool],PVT_STAGE_SOURCE_SSv2.[ball], PVT_STAGE_SOURCE_SSv2.[raft] FROM PVT_STAGE_SOURCE_SSv2 With Me.lstExclude For i = 0 To .ListCount - 1 sProd = .List(i) pArray ("PVT_STAGE_SOURCE_SSv2.[" & sProd & "]") Next i End With
View Replies!
View Related
Multi-cel Array Formula Not Working
See attached sample workbook. Row 37 current has formulas between columns AQ and IP that return a value 2 or 4. Conditional formatting on these cells then gives them an appropriate colour. Due to the large number of cells involved, I wanted to use a multi-cell array formula instead. I have attempted this on row 50 which should give the same results, but as you will see this is not happening.
View Replies!
View Related
Entering Multi-cell Array Formulas
I successfully built a multi- cell array that sorts a bunch names into ascending order. But now when I need to use the same array formula again, I get the wrong results in the array formula cells and I can't figure out how I'm entering the array incorrectly. The error I get in each of the 7 cells is the identical number, "1". Here's the deal. Cells B10 - B16 contain names and numbers that I need sorted in ascending order. Then, I highlight cells C10 - C16 and enter the following formula using shift-ctrl-enter: ...
View Replies!
View Related
Multi-result Array Formula With Max
I am using multi-result array formulas to reduce error checking when processing arrays of numbers. However I cannot get this to work with some of the functions as they use Max or other array aware functions and so ruturn the same result for each cell they are enetered into. Example for A1=2,B1=4 =2*A1:B1 array enetered gives 4,8 However =Max(2*A1:B1,5) array enetered gives 8,8 rather than 5,8. I have tried creating my own version of a max function, but am having problems getting it to evaluate array functions.
View Replies!
View Related
Dimensional Table
i have a problem with my report. there is a dimensional table: DIM RESULTSDIM_111.1DIM_111.8DIM_111.2DIM_25.3DIM_25.5DIM_380.2DIM_380.1DIM_380.35 i need to make a new table in wich all "dim" will repeat only once and the results will be the average of the results that belongs to the same "dim" the times that the "dim" repeats can change and the "dims" could be not only till 3
View Replies!
View Related
Macro – Two Dimensional Look Up
The workbook has two sheets. Sheet1 has numbers in column A going down the sheet and dates in row 2 going across the sheet starting in column B. Sheet2 is similar but the column and rows do not line up with sheet1. I would like the macro to look at the numbers in column A and the dates in row 2 on sheet1 and find the same match of number and date in sheet2 and enter the value from sheet2 into the appropriate cell in sheet1. I understand it can be done in a formula with index and match but I would prefer a macro.
View Replies!
View Related
Dimensional Weight Formula
I have attached a sheet that contains a pretty simple formula that helps me figure out the dimensional weight of a shipment. It is just a simple vlookup that returns the proper rate (Column H) depending on DIM Weight and Zone. It works great. The issue I'm running into is with various exceptions that I need to put into the formula. The criterias that I need to put into the rate formula (Column H) are: 1-If the one of the Length (Column A), Width (Column B), and Height (Column C) is greater than 60 I need to add 7.50 to the the returned lookup value in Column H. 2-The second longest side the Length (Column A), Width (Column B), and Height (Column C) is greater than 30 I need to add 7.50 to the the returned lookup value in Column H. 3-If the grith (2x Column C + 2x Column B) is greater than 130 I need to add 45 to the the returned lookup value in Column H. I'm working with a few IF formulas but I can't seem to get all of them to work at the same time. Does anyone have any thoughts?
View Replies!
View Related
Bi-dimensional Dynamic Range
I've tried the below formula to get a bi-dimensional dynamic range that is defined by the last no blank column and last no blank row, too. =A1:INDEX(A1:D18,MAX(NOT(ISBLANK($A$1:$D$18))*ROW($A$1:$D$18)),MAX(NOT(ISBLANK($A$1:$D$18))*COLUMN($A$1:$D$18))) Does any one have a different approach to get this without using the offset function?
View Replies!
View Related
2-dimensional Date Range Criteria
Attached is a really simplified version of what I'm trying to accomplish. I'll attempt to get my brain working well enough to explain it: For each row, I have a person's name, their department, their site, and then a series of dates (representing dates of attendence). The four columns after the dates ("Counts" is the first) are me trying to keep all the right numbers in mind, and are the routes I've been trying to take on this. I have also tried to make a custom formula called ClassInRange, which isn't playing nicely. What I eventually need to populate is the little 2x3 section at the bottom where the three sites and the two departments I'm working with (down from 5 sites and 8 departments for the sake of sanity). What I need to be able to do is populate those cells with something that will tell me how many people from which site and department have attended something within the date range. So, for example, I need to know that the 2 guys in Wellesley attended something between January 1st and December 31st of 2007. (American date style, in case anyone's lost) If you're able to help, please keep in mind that I'm not the end-user; I'm just the slightly crazy dude trying to create this thing and make it simple to use. Eventually, the Dept/Site box will be part of a template which is copied and pasted up to four times on a report sheet, each fed by different date-range criteria. Also, the important information is the person's name, dept and site, which I hope gives some reason behind the organization; we want to find the person easily.
View Replies!
View Related
Double Lookup From Two Dimensional Table
I am trying to get a cell in my spreadsheet to look up a value based on two values. I have a dropdown list that lists the worksheets in the workbook, and each worksheet has a table with width measurements for the columns and height measurements for the rows. I have a function that is mostly working, it calls the data from the proper worksheet, but it rounds the measurement values down, and I need it to round to the next highest value on the table. For instance, the measurement may be 55" x 55" in, but the table has values for 54" and 60". The current formula rounds down to the 54" measurement, but I need it to round up to the 60". I have attached what I have so far with further notes and cells highlighted.
View Replies!
View Related
2-dimensional Date Range With Dynamic Copy And Paste
Some of you may have seen my 2-dimensional Date Range Criteria thread . By request, that thread has been closed and I am opening a new one on a related, but infinitely more complex note. The solution to the previous thread worked, but not well with my project. I'll go a little more in depth into how my project works, and try not to be too detailed and irritating. I am trying to create a homebrew Learning Management System for some of the Training courses that my department offers. I've posted here a few times on the same project, and the advice from all previous posts has been excellent. What I have so far allows users to input all of the relevant information about a participant, and then keep track of the dates when they took a particular course. They input this information with a Userform. This data goes into a Participant Master List, which is where the majority of the functions take place. There is a Workings sheet set to xlVeryHidden, which houses some other information, including results for searches, and finally there is the Report Template--the source of my original question. The original question was how to make a formula that would track how many people from each department and site have attended training within a date range. That question was answered in the 2-dimensional Date Range Criteria of the report. What makes it potentially more complicated is that a user might want to generate two or three reports at the same time to compare side-by-side. I'm pretty sure I can make something that will do this, and allow it, but the way it's looking could be really complicated--extreme headache, and a lot of VBA coding.
View Replies!
View Related
ComboBox Not Populating
I have a combobox that is not populating correctly. The design of it uses an existing list (which changes every month) to populate the contents of the combobox. I want the user to be able to select a location from the list if it is already on the worksheet, rather than having to key in the location name for every single record. This Sub worked just fine and dandy for me until I deployed the workbook to the end user. Then this particular combobox decided not to work. I have been over this code many, many times and I am almost positive that it's just a matter of my not being able to see the obvious. Perhaps another set of eyes looking at the code will be able to see what I can not. Sub get_Locations() Dim allCells As Range, Cell As Range Dim noDupes As New Collection Sheets("Main").Select ' get the first from last row #--the last row is a row of record counts and sums. endRange = ActiveSheet.UsedRange.Rows.Count - 1 ComboBox1.Clear ' This will clear the combobox. If endRange 65536 Then ' If the row number is not the end of the worksheet, _ there must be something already on the worksheet, so build the list. On Error Resume Next ' Get unique values in range by checking each cell in range. For Each Cell In Range("D12:D" & endRange) noDupes.Add Cell.Value, CStr(Cell.Value) Next Cell On Error GoTo 0 ' Sort the collection alphabetically within the combobox For i = 1 To noDupes.Count - 1 For j = i + 1 To noDupes.Count If noDupes(i) > noDupes(j) Then Swap1 = noDupes(i) Swap2 = noDupes(j) noDupes.Add Swap1, before:=j noDupes.Add Swap2, before:=i noDupes.Remove i + 1 noDupes.Remove j + 1 End If Next j Next i ' Add items to combobox in their new alphabetical order. itemIndex = 0 For Each Item In noDupes UserForm2.ComboBox1.AddItem Item, itemIndex itemIndex = itemIndex + 1 Next Item Else ' otherwise there's no list to populate and the default row is 12 endRange = 12 Range("A12").Select End If End Sub And just for the record, all object references (cell ranges, comboBox, etc.) are valid and correctly named, so I know it's not there. I also recognize that I have overspecified things by using "UserForm2", but I have done that in the hopes of finding the problem. And the code does execute at the proper times, populating "noDupes" correctly. The problem seems to occur near the end, in the block where noDupes is added to ComboBox1.
View Replies!
View Related
Populating A Listbox
I have a spreadsheet that continuously is having data input in columns A-F. I want to have a listbox automatically populate each time the worksheet is opened. I would like to have a macro that will search for all rows that have data in columns A-F that DO NOT have data in column L. I would like the macro to populate a listbox when the worksheet is opened with the data from columns A-F of all rows that meet the previously stated criteria.
View Replies!
View Related
Populating Lists
I have 16 seperate titles and a different figure for each title. However, these 16 titles are repeated hundreds of times, in different orders, down a column. I need to populate the list with the numbers that belong to each title. I don't have v look up on my computer. I am useless at excel.
View Replies!
View Related
Listbox Not Populating
The students are not being populated on Listbox3 when I select an item in Listbox2. Only the first selection appears and not the others. Thank you in advance. Attached is the image file and the excel file itself.
View Replies!
View Related
Populating Combobox
I have a spreadsheet with loads of different columns on it, I am using a userform to control the spreadsheet. I have one form that allows me to add data to the spreadsheet and another that allows me to search it. If one of my colums was a list of "counties" what I want to do is to have a combo box that displays all the counties listed so I can pick a specific one and and search it. This I can do, the problem arises if a new county is added to the spreadsheet it will not be displayed in the combobox because I am using the additem "....." function to populate the box.
View Replies!
View Related
Re-populating Hyperlinks That Have Been Cleared
I have a worksheet that I have removed a good number of hyperlinks, using the remove hyperlink function. My problem is that every so often, the hyperlinks are back on the sheet, without seeing any wording for the hyperlink. Some place, a long time ago, I saw that there was something in the program that either stopped this from happening or turned the function off or a way of restoring removed hyperlinks. Today, I can't find it. If I run my cursor over the spreadsheet, even over blank cells, I will get the evil finger of fate (so to speak) indicating that there is a hyperlink in that cell and yes, there is. If I click the cell, the site will be activated. How do I keep these removed hyperlinks from returning. I've also noticed that at anytime, while working on the sheet, everything flickers just as if the links are being re-populated. After a second or two the flickering stops and yes, the links are back.
View Replies!
View Related
Auto-Populating Calendar
I am looking for an excel calendar that will auto-populate content into it based on a spreadsheet that I fill in. Maybe I would just need the formula that would be inserted into each calendar day? I'm not sure how you would set this up, but I'm open to suggestions! I have attached the .xls file for your reference. For example: The comment "Client 1 - KOM" would populate in a blank calendar in excel on the date 3/23/2009.
View Replies!
View Related
Populating A Combo Box
I have a combo box in a report that currently updates using this code. Sub popcombo_Initialize() With Sheet1.ComboBox1 .AddItem "Budget Card" .AddItem "Car Insurance" .AddItem "Charge Card" .AddItem "Credit Card" .AddItem "FRS" .AddItem "Home Insurance" .AddItem "ISA" .AddItem "Life" .AddItem "Other" .AddItem "Pension" .AddItem "PEP" .AddItem "Personal Loan" .AddItem "Personal Reserve" .AddItem "Pet Insurance" .AddItem "Savings Protection Plan" .AddItem "Travel Insurance" .AddItem "Travel Money" .AddItem "Unit Trust" .AddItem "Wedding Insurance" End With End Sub But some items on this list are missing from month to month and don't need to be included for selection so I need a more advanced version of this that populates from a list in data. Is there a way for it to look at a column in a data range containing month, then look at the column containing Product and take a definitive list of all products that match a certain month?? So Credit card might be mentioned 300 times for the month of september but it appears only once in the combobox?
View Replies!
View Related
Cell Auto Populating
I need column B to self populate cells with "1" if a specific range of room numbers are entered in column A. Is this possible? Column A, room numbers from all over hospital. Column B auto populate "1" if rooms ranging from M570 to M590 in Column A
View Replies!
View Related
Populating From One Sheet To Another, By Date
I am trying to total up by a Range of Dates some information from one page to another through VBA. I am having a tough time with this one, I can't seem to get the correct information over to the other page. I have successfully been able to transfer the data via a series of SUMIF statements, but it really is very inefficient and takes a while when the data repopulated by another program. So I am trying to do it via VBA.
View Replies!
View Related
Populating UserForm With Arrays
I want to populate a drop down with items in an array (aMasterList) which contains a list of arrays (aList1, aList2, etc.). When I select an item from the drop down, I want to populate a List Box on the same form as the drop down with items contained in the corresponding named array. Here’s what I have: UserForm1 DropDown1 ListBox1 Sub PopulateForm() Dim aMasterList(), aList1(), aList2(), aList3() ‘Load into DropDown1 aMasterList = Array("aList1", "aList2", "aList3") ‘User selects from drop down and the below items populate ListBox1 aList1 = Array("Green", "Blue", "Yellow") aList2 = Array("Apple", "Pear", "Grape") aList3 = Array("Flowers", "Trees", "Bushes") End Sub
View Replies!
View Related
Creating A Folder And Populating It
I am using a excel 97 and have a macro that generated hundreds of work books on a single run. Due to the extensive number of work books, i would like to save all of this into a single folder. I able to create a folder on my macro by using the "MKDIR" command, however I can not seem to save any of my workbooks on that newly created folder, do i have to release that folder first. I get a message saying "Miscrosoft Office Excel cannot access the file (Folder). The command i am using to save the files: ActiveWorkbook.SaveAs Filename:=Output_Name, _ FileFormat:=xlNormal The Output_Name contains the full path including the new folder name and the workbook name. What do you think i am doing wrong or not doing at all?
View Replies!
View Related
Populating A Range Of Cells
I am attaching an example sheet with this. I am trying to populate a range of cells in sheet1(from sheet2) based on value in cell A1 on sheet1. VLOOKUP brings only one cell value, I need to bring in a range of cell values in different cells on sheet1.
View Replies!
View Related
Populating A Cell From Different Lines
I am trying to make sheet that will give me averages from different groups within a worksheet. In E64 I would like to have the total that is in I4 unless there is a total in I24 or I44. When I made the worksheet, it figures everything great but when I remove the data on following weeks it messes up the averages.
View Replies!
View Related
Populating A Combobox Manually
I'm sure there is an extremely simple answer to this question, but I can't seem to find it anywhere. I am adding a combobox to a userform using the controls toolbox. How can I populate the combobox without a macro? I do not want to add extra code to the UserForm_Initialize() event because this would just add clutter (I have seen numerous examples using .AddItem) I would like to just change the combobox by hand.
View Replies!
View Related
Combobox Not Populating Correctly
I have a userform with a combo box that is populated from a list in a sheet called Clients. The userform is in the same workbook as the Clients sheet. This workbook called "Client List.xls" and is set to be hidden from view. I've created a menu bar icon that loads the "Client List.xls" workbook, and on open runs the initialize procedure. The problem seems to be caused by the "Clients List.xls" being not the active workbook. Is this the case? Is there a way around it? If I unhide the workbook and make it the active workbook, the code works great. Private Sub UserForm_Initialize() Dim rngClients As Range Dim wsSheet As Worksheet Set wsSheet = Workbooks("Client List.xls").Sheets("Clients") With wsSheet .Range("a65536").End(xlUp).Select .Range(Selection, "A1").Select End With Set rngClients = Selection With cmbClients .RowSource = rngClients.Address .ListIndex = 0 End With
View Replies!
View Related
Referancing Cells And Populating Another Worksheet
I have two worksheets. One worksheet is pulling in data from an OLAP cude. I have it configured as a pivot table. The other worksheet contains my dataset. Both worksheets are in the same file. In my datasheet worksheet I would like to pull in data from the other worksheet. I would like to be able start a few cells and then drag so that it autopopulates the values. Here is the formula I'm using ='Affiliates Pivot'!$F10 ='Affiliates Pivot'!$F11 ='Affiliates Pivot'!$F12 it poulated with the values 23 45 64 then I select the 3 cells and drag so that I can autopulate the remaining values. It enters the formulas ='Affiliates Pivot'!$F10 ='Affiliates Pivot'!$F11 ='Affiliates Pivot'!$F12 ='Affiliates Pivot'!$F10 ='Affiliates Pivot'!$F11 ='Affiliates Pivot'!$F12 ='Affiliates Pivot'!$F10 ='Affiliates Pivot'!$F11 ='Affiliates Pivot'!$F12 what I really want is ='Affiliates Pivot'!$F10 ='Affiliates Pivot'!$F11 ='Affiliates Pivot'!$F12 ='Affiliates Pivot'!$F13 ='Affiliates Pivot'!$F14 ='Affiliates Pivot'!$F15 ='Affiliates Pivot'!$F16 ='Affiliates Pivot'!$F17 ='Affiliates Pivot'!$F18 Is this possible? How can I do this?
View Replies!
View Related
Populating A Table For Gear Calculations.
I have a list of numbers (each corresponding to a different available gear). I have four columns and am trying to populate those columns with all the possible variations without using the same gear twice in any one row. Is there any way of doing this automatically or with a script or something? There are 16 different gears so it could be rather time consuming to input all variations manually. The attached worksheet has what I am trying to do begun. The possible number of iterations or variations is apparently enormous and am hoping for an automated way to populate those cells.
View Replies!
View Related
|