Hiding Source To VLookup?
Sep 17, 2013
I current have a Vlookup looking at the source data in another workbook stored in a drive so that only limited people have access. Because this information is linked to a drive I thought that it wouldn't return a value if you didn't have access to the drive but I was wrong. Is there a way to remove the Vlookup information if you don't have access to the drive?
View 4 Replies
ADVERTISEMENT
Nov 11, 2013
Context: I'm pulling a data set "A" into excel from MS SQL (currently 48,000 rows ... comes back in < 10s). I will add a field "Cost" to data set "A" that uses info from that data set to look up a value in data set "B" which is in another Excel Sheet and perform a calculation. The sheet that contains data set "B" may or may not be in the same file - haven't decided yet but I'm not really concerned about that.
I actually have the calculated "Cost" field added to the end of data set "A". When I refresh the data, the fomulas recalculate.
My intent from here is to present the data in a pivot table. I will add a "Refresh Data" command button that:
1. Updates the data from MS SQL
2. Refreshes the pivot
I've done 1&2 many times before and have code I'll reuse.
The problem: I cannot present a pivot sourced straight off the amended data set "A" because it contains fields that should not be accessible by the audience for this report (as a matter of policy). I haven't found a way to hide/suppress source fields in a pivot table so I'm guessing that it is not possible. So I need to somehow get to a dataset that I can use to source my pivot which does not include the confidential data but includes my calculation.
Options I'm considering:Via VBA: Create a copy of Data Set A (including my cost field) as Table C on another sheet and remove the confidential columns from the table. The Pivot Table would be sourced against TAble C. My assumption is that I'd have to be very careful with how I clear out and re-populate table C as not to have to "start over" with my Pivot Table each time it is refreshed. Ideally the pivot design would look just as it did before the user hit the "Refresh Data" button (other than it has the updated data).Order my fields in data set A (with the calculated field) such that I can define a named range that is the source for pivot table. The range would exclude the confidential fields. The Refresh Data macro will just need to resize the named range after the data is refreshed from SQL server. With this option, I just have trouble trusting that excel will never arbitrarily change the field order when I refresh the data connection.Create Data Set C using another query from SQL Server that only has the fields that I want available in the pivot plus a "sumproduct" formula that gets cost from Data Set A. The Refresh Data macro would refresh A then C then the Pivot table. What I don't like about this is having to keep the 2 queries in sync -- there is not a large risk of these queries needing to change, but you never know.
View 4 Replies
View Related
Feb 12, 2010
I am having trouble with a number of workbooks when using vlookup (using the wizard rather than entering the formula directly)
First I select the cell with lookup value, then try to select the table array on the source sheet but the cursor changes to the hand symbol and I can't click on any cells. I have had this problem with many different workbooks. The only solution I have found is to copy the whole sheet, paste-special-values into a new sheet and use that as source.
View 11 Replies
View Related
Feb 23, 2012
I'm trying to create a macro that will open automatically generated report outputs and manipulate the data.
The macro will run from it's own workbook (Report Macro.xls), sheets / cells within this workbook are available as 'helpers'.
So far what I have working ok is;
Via a browse dialogs in a userform in Report Macro.xls I select 5 different report outputs. I'm storing the full filename & path in Sheet Data, Cells B1:B6 (B1 being the filename & path to the macro file). In column C I have just the filename
The first file is opened and manipulated as required. The next thing I need to do with it is to open the second file (filename / path in B3) and put a Vlookup in cell 02 of the first file which will look for data in the second (the second file will only ever have a single sheet).
As a formula I'd be using
Code:
=VLOOKUP(A2,'Email 22FEB12.XLS'!$B$7:$C$13120,2,FALSE)
In VBA if I use;
Code:
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-14],'Email 22FEB12.XLS'!R7C2:R13120C3,2,FALSE)"
It works great. However, the second filename will change and I need to take it from the macro file, sheet 'Data', cell 'C3'.
How can I use the contents of sheet Data, cell C3 in the VBA code above instead of the filename being hard-coded?
View 1 Replies
View Related
Dec 30, 2013
I have created a spreadsheet from a master using vlookup. I want to be able to hide rows which contain a null value (NA) in column B (sample attached). Is there a formula I can use which won't interfere with the vlookup or do I need to hide the rows individually? I tried filtering but that only filtered the cell and not the whole row.
test sheet.xlsx
View 3 Replies
View Related
Dec 17, 2013
I have 2 sheets, lets say SheetA1 and SheetA2. I am using Vlookup to serial number & getting data from SheetA1 to SheetA2. But I want to modifty the data. If i modify the data in SheetA2 that modification should relect in SheetA1. Is it possible...
View 5 Replies
View Related
Jun 6, 2013
I have an excel file - central database - that holds a lot of raw data organized in tables. There are more than 15 files (dependent files) that access this data using VLOOKUP formulas.
I now need to add a few columns to the central database and these columns can't be after the columns already existing, i.e. they have to be on the left of some of the existing columns. Inserting those columns is going to mess up all the vlookup formulas in the dependent files.
Is there a way change the central database file without affecting the vlookup formulas in the dependent files?
View 2 Replies
View Related
Aug 26, 2009
I've used vlookup before but his #REF problem has me stumped.
I want to concat two cells in the Source worksheet and vlookup into the Defs sheet, but I keep getting #REF(G4:G6) when I want to return the 2nd column in the Defs sheet. What's curious is when I modify the vlookup to return the 1st column I correctly get the lookup cells(G6:G9).
What's wrong with the formula in G4.
My requirement is I can't change the format of the Source worksheet because it contains macros that work with ERwin. And it is MUCH bigger than the attached sample so I will copy/paste the formula down 6000+ cells.
View 2 Replies
View Related
Mar 28, 2013
I've got 3 columns of formulas that end up doing what I need, but I'm thinking it could probably be done easier with VBA.
I have 1 book with a sheet I'll call Log & another book with a sheet I'll call Source. On the Log, column E has the first 9 characters of vendor names & /vendor number (ex: EDMUND FI/00250), along with other data out through column P. On Source, the vendor names are in C & a short code for their name is in A.
I need to compare the first 9 characters in Log col E with the first 9 characters in Source col C. When a match is found, I need to return the short code from Source col A. BUT - if there's a duplicate in either Source col C or A, instead I need to return the word VERIFY, preferably with the cell highlighted in red.
Right now, I have, on Source col L:
Code:
=MID(C2,1,9)
and in source M:
Code:
=IF(OR(A2=A1,A2=A3,L2=L1,L2=L3),"VERIFY",A2)
This gives me the first 9 characters of the vendor name in L & the short code OR VERIFY in M
Then, in Log col R, I have an array formula:
Code:
=VLOOKUP(MID(E4,1,9),'[PRETICKET P ADDRESSES working.xls]Paddress'!$L:$M,2,FALSE)
This gives me either the short code or VERIFY from Source M. Also, sometimes it doesn't find a match & it returns #N/A. Then I have to do Conditional Formatting to make the VERIFY cells red & I thought I'd make the error cells be yellow (although I haven't figured out the CF for that yet)
Is there a better way to do this with VBA? I'm working with Excel 2010; just got it & still figuring it out.
View 2 Replies
View Related
Apr 1, 2009
Not sure if this can be done, still a rookie at this stuff. Everything works but can something be wrote into code too change list source?
View 5 Replies
View Related
Sep 7, 2006
I have a report that was created for 2005 that contains two worksheets: a "source data" worksheet and a " pivot table" worksheet. I cleared out the 2005 data in the "source data" worksheet and replaced it with 2006 data...after this I refreshed the Pivot Table and everything seemed fine. When looking at the file size I noticed that it was almost twice its original size....upon further investigation I found that the Pivot Table was internally holding onto the old source data (the "Show" functionality of the rows/columns in the table lists the 2005 row/column headers as well as the 2006 headers....even though no data from 2005 is shown in the Pivot Table).
Does anyone know how to purge the old data from the internal Pivot Table memory?
I hope this is enough information....let me know if you need more.
Thanks in advance for any help,
Jon
View 9 Replies
View Related
Mar 10, 2014
I've created a spreadsheet that will be protect for use by others. I want to hide cells that are not used so it just leaves to print area in view and gives a simple and clear look.
I know how to hide rows, columns etc but there are always further rows and columns there. I'm sure this must be simple.
View 1 Replies
View Related
May 28, 2014
I have a VBA application that seems to work fine under vista but once I start working with it in Windows 7 I notice sometimes one of my userforms do not go away when asked to hide. The code is like follows:
Application.ScreenUpdating=true
Waitingform.Hide
View 1 Replies
View Related
Jul 1, 2009
I have two command buttons, and need one macro that would hide all blank rows between columns "E" and "O" and from row 9 to 42, and then another macro that would unhide all these rows again.
View 2 Replies
View Related
Sep 7, 2009
I have a spreadsheet with 5 worksheets going, I've been trying to find code that will hide and unhide certain tabs depending on the answer to C21 of Worksheet 1.
If C21 = 1 then show sheet 3 but not 4 or 5
If C21 = 2 then show sheet 4 but not 3 or 5
If C21 = 3 then show sheet 5 but not 3 or 4.
View 5 Replies
View Related
Oct 29, 2012
I am building a real estate model. What I am trying to do is the following:
If I enter the number of tenants in a cell (let's say the number of tenants is 6 and the cell I enter this number in is cell J11), I would like 6 of 15 rows to be shown below (rows 46-60). Therefore, the 9 unused rows (rows 52-60) would be hidden from sight. Furthermore, if I entered the number 3 for the tenant count, excel would hide 12 rows (rows 49-60). I am sure that this is a VBA code.
View 1 Replies
View Related
Aug 3, 2007
I am useing a user Form
On the Form which I call my main menu, theres a help button, with this code
Private Sub cmdHelp_Click()
MsgBox ("Help file not ready yet, good luck on your own, Have a Nice Day!")
End Sub
For some reason when this is click, and after the user clicks ok on the msgbox, the frmmain, which this command is on, minimizes itself
View 9 Replies
View Related
May 7, 2008
I'm trying to hide a UserForm (using myFrm.hide) once the command button on the form is clicked. I'm getting the following error:
Run-time error '402'
Must close or hide topmost modal form first.
Apparently the form isn't the 1st in the z-order. How can I see the z-order of my forms?
View 9 Replies
View Related
May 14, 2008
Seems like this should be pretty cut-n-dry to me...I thought I could "hide" an Autoshape (AutoShape 19) using some formula [I.E. =IF(B12="","",SUM(C37:C45)) ] but I cannot get it to work...
Basically I dont want to see the shape if there is no data D49.
View 9 Replies
View Related
Jul 21, 2008
I am trying to use the following
[code] ....
and modifying it to:
If Sheets("TPM").Range("al13").Value = 2 Then ActiveSheet.Shapes("Check Box 391").Visible = True
The first one works OK, but when I try to add an if / then statement, it gives me an error message.
I want to hide Check boxes 391 through to 426, using a single macro.
View 9 Replies
View Related
Feb 1, 2009
hi ive made macros on excell conecting my sheets so i dont need my tabs how can i hide them and then when i need them view them again.
View 9 Replies
View Related
Jun 11, 2009
A workbook with 7 sheets in it. The first sheet contains buttons with macros that when clicked will navigate you to different sheets in the workbook based on what button you click. Here's what I want to do. When the workbook is opened, I want it open to that first sheet with the buttons, but show no other tabs for the other sheets at the bottom. And then when that button is clicked on the first sheet to go to a different page, I want that page to be the only visible tab in the workbook with the rest still hidden. Is that doable? I already have the buttons and codes and everything for the navigation part down, I just need to have the other hidden when I'm on a different sheet.
Sub Button10_click()
Worksheets("Account Type").Activate
End Sub
Sub Button11_Click()
Worksheets("Name Change").Activate
End Sub
Sub Button12_Click()
Worksheets("Address-Phone").Activate
End Sub
Sub Button13_Click()
Worksheets("Main Menu").Activate
End Sub
Sub Button15_Click()
Worksheets("Cust-Owner").Activate
End Sub
Sub Button16_Click()
Worksheets("Misc").Activate
End Sub
View 9 Replies
View Related
Jun 16, 2009
how to hide a row if a value in a cell equals zero?
View 9 Replies
View Related
Jan 13, 2010
I need to unhide all hidden sheets in a workbook, run some marcos on the hidden sheets, then re-hide only the sheets that were hidden. For each workbook the number of hidden sheets will vary as will the names of the sheets. Is there a way to capture the current hidden worksheet names before I unhide all worksheets and apply the captured names for re-hiding?
View 9 Replies
View Related
Oct 25, 2006
a bit of code so that when I open a sheet (which takes data from another sheet) it hides rows which contain a zero in a certain cell?
View 10 Replies
View Related
Oct 2, 2008
I use Excel 2000.
I want to hide all toolbars when I work.
I know how to hide them during a session, but when I exit and reboot Excel, the "standard" toolbar always returns.
Is there some way to hide the "standard" toolbar permanently?
View 8 Replies
View Related
Oct 13, 2008
Hiding sheet tabs. can you hide tabs on excel?
View 4 Replies
View Related
Nov 11, 2008
I've created an Excel spreadsheet (Excel 7) to help me price sign printing jobs consistently. In my spreadsheet a few cells allow me to enter markups for materials & labour rates. These are used for calculating the retail price.
I would like to give my spreadsheet to some of my customers so they can calculate the retail price of a job themselves BUT, I would like to hide the contents of those few cells where I fix the markup. How can I achieve this?
View 3 Replies
View Related
Sep 4, 2009
I'm trying to hide all but one duplicate value in a list; I have a report that can give multiple results for each record, but to make it cleaner to read I want to hide the duplicate values, such as customer names etc. after they have first appeared. I'm aware this may not be a very clear explanation so have attached an example spreadsheet.
The left-hand list is similar to what I would start with and the right-hand list is what I am looking to achieve. Conditional formatting will format duplicates but will obviously all to all and can't use the remove duplicates function as it will take away the unique values alongside them in the row. Preferably I'm after a solution that works in both '03 and '07 but it's not a disaster if I can only do it in '07.
View 5 Replies
View Related
Jan 21, 2010
I was wondering what would be the best way to go about hiding either rows or columns based on whether a particular cell is empty or not. The reason being, I want a graph and table to only display data when present.
View 14 Replies
View Related