In Access and Excel 2013, I am simply trying to import an Excel tab into Access. For some reason, Access is importing all 1,048,575 rows, but only the 42 columns I have in the Excel sheet. I am positive (through several methods and attempts) that there are no blank cells or random data entered into an obscure cell - its clean. Does anyone know why Access is bringing every row in? I have let Access dictate the primary key, created my own, added a column, etc - still brings in every row.
I appreciate the help.
Deleting (right click delete) all cells below the data, within the populated rows, configures the Used Range to the cells that contain data, rather than the final cell in the worksheet in Excel.
Related
I have made a connection in excel to another excel workbook, using the native functionality found under the data tab in excel. I imported the data into my "Main" excel workbook from the "Other" workbook by Selecting Data->existing connections and then opening the relevant sheet. This allowed me to link the data from my other workbook to my Main workbook.
My issue is when the data in the Other workbook is changed i received a #ref error in my Main workbook. The formulas i use on the imported data are pasted in a separate sheet (i tried pasting it next to the imported data as well). Note: i paste the formulas from row 1 - 500 for the respective column, so that when the data is imported the formula automatically populates the cell with the correct value. When i refresh the data (i.e when data has been changed in the Other workbook) It seems as the formulas i have copied down do not reference the correct cell anymore.
I have tried using an indirect but to no success.
This is what the formula i use looks like
=IF(INDIRECT("A"&ROW(#REF!))<>"",VLOOKUP(INDIRECT("A"&ROW(#REF!)),'Safex Codes'!$A$1:$H$1000,8,0),"")
However when the data is refreshed "SOME" of the rows in the column the formula is in return this formula
=IF(INDIRECT("A"&ROW(#REF!))<>"",VLOOKUP(INDIRECT("A"&ROW(#REF!)),'Safex Codes'!$A$1:$H$1000,8,0),"")
This occurs everytime i refresh the data. What is strange is that at the end of my data, hence the last time the formula is being called, the referencing to the correct row is completely off.
For example in row 28 i would expect the above formula to reference a28, however i receive
=IF(INDIRECT("A"&ROW(A24))<>"",VLOOKUP(INDIRECT("A"&ROW(A24))
I'll bet that you're having the same issue I was. When the number of rows in the data range changes, the unused cells previously populated with data are deleted. The formulas that referenced those deleted cells no longer have references to them because they've been deleted (hence the #REF errors).
You can change Excel's behavior with respect to handling new or unused rows using the Properties menu on the Data tab.
In that menu, take a look at the section labeled "If the number of rows in the data range changes upon refresh." I'm guessing you have the first option checked. Try the third option.
I have a large Excel spreadsheet and need to provide some automated sanity checks by selecting options from a couple of dropdown lists which have directly defined options i.e. in data validation values are entered directly instead of using a cell range.
I have tried writing a value to the cell but it is protected from direct writes.
I could add a cell range instead of directly defined values if need be.
Everything else works, opening the target spreadsheet, writing other values, reading back etc.
Thanks
Removing the protection worked.
The target spreadsheet takes a few seconds to perform calculations each time and I have not had to add any waits or status checks before reading the values back from other cells.
I have two sheets in an XLS file. 1st Sheet pulls up some data from web and updated. 2nd Sheet is analysis of the data in Sheet-1.
Now whenever I refresh data in sheet-1, the data in cells in Sheet-2 automatically refreshes. I want to stop this. I want to cells become inactive in Sheet-2 and thus don't have any impact of refresh and their values remains the same even after refresh.
How, is this possible? In other words, when I refresh I want to see the previous analysis and new analysis both. But when I refresh the same, the previous data is lost.
Disable automatic calculation (file / options / formulas), i.e. choose "Manual calculation".
Activate the import sheet that loads data from web. Calculate (i.e. refresh) this sheet only (Menu: Formulas / Calculate Sheet).
Now, the import sheet should be up to date, but the second sheet should still show the old values.
To finally synchronize both sheets again, either activae automatic calculation, or just press (forces workbook calculation incl. all sheets).
I get seven workbooks (xlsx files) from different clients, each with one sheet.
Each sheet has at least one common ID column (UNIQ, PK). One of the workbook contains list of all possible ids. Others may not have record for all ids, but each row has id value defined.
I need to make a final workbook, with first column ID and then union of all remaining columns from each file.
Then I need to send the final.xlsx via email, so its independent of the source files (I'm not sure if its possible to dereference it while retaining the constant values).
Can we do this using VLOOKUP or built-in Excel functions?
If you are going to perform this operation only once. You can do it like this:
Go to the workbook which contains all the IDs(Workbook0)
Apply vlookup in Workbook0 to fetch all the values you need from workbook1
Repeat the process to fetch values from workbook2...3..& so on
Eventually you should have a workbook (workbook0) which will have all the data you want, with ID in first column & rest of the data in further columns
Now to de-reference it, select all the cells which contain formula & press Ctrl+C
Without deselecting, go to Paste -> Paste Special & select Paste Values. This will overwrite the formula cells with only values
Then go to Data -> Connections
Break any connections with other workbooks (if exists)
Save & you are ready to email an independent file
Also, if this is something you have to do very frequently & the steps remain same. I'd suggest that before starting, you click on Record Macro, then perform above steps, tweak that code a little, save it in some other file for future & from next time you won't have to do it manually.
In case you would like to try different approach, take a look at the "Excel Query Wizard" https://superuser.com/questions/722348/merge-and-combine-in-excel/747430#747430
Import the two excel files into Access database.
Use Query wizard to select from the two tables and copy the result to a new excel sheet.
Access and Excel are in the same package so no extra cost.
I want to set up Data Validation on a cell / row of cells so that the value in that particular cell cannot be changed but all the rest of the sheet can be edited, thus why I am not using read only.
Currently if I enter the value in the cell, go to Data > Data Validation > Custom & enter ""it achieves this (see screenshots http://imgur.com/a/Ggqar)
What I want to do is set this validation via the cell rather than manually as I plan on writing this field entry when create the excel document through my application.
I have done a lot on searching online and found methods for doing countif etc.. but nothing deal with formula entry for the Custom criteria.
Is anyone able to help?
Thanks for the quick reply DanB but it's not exactly what I am trying to achieve. My end goal is that my application can pass a value into the file (Column A Row 1 [If easier for formatting it can go into each row in column A which is populated but not required]) and the file will be saved locally. The user will then be entering details in Column B, C, D, E, etc... on their local machine, saving it and processing the file again. I want the application to check Row 1 Col A for the value and decide on how to process the remainder of the file based on this value (the reading the values in the file works already). Because each time my application generates a file it will be unique I want to try do the Data Validation using a formula in the cell so that I can write it using my application and not have to manually apply settings to the file. Is it possible to do this kind of validation using only formulas in the cell when populating it?
Fastest solution would be to use a Protected sheet, but only protect that Cell.
To do this, select the entire sheet, and choose Format Cells.
On the Protection tab, remove the check from Locked.
Now, select just the cell you want to protect, and lock it using the same method. At this point, your entire sheet, except for the 1 cell should have Locked unchecked.
Now, on the review tab within Excel, choose protect Sheet, and uncheck the option to "Select Locked Cells".
Then, while the sheet is protected(you can password protect that part of it), that cell can't even be selected, yet the entire rest of the sheet can be.