Seeing If Value Is On Another Sheet Function
Aug 6, 2013
I'm trying to write a function for one of my reports that would perform a boolean function to see whether or not a cell's value is on another sheet in the workbook. Pretty much (If it's on that sheet, Yes, if not, see if it's on this sheet). Here's what I have so far
Code:
Public Function ISTHERE(CUSIP As String) As Boolean
If Sheet4.Columns("B").Find(CUSIP, LookIn:=xlFormulas, Lookat:=xlWhole) Is Nothing Then
If Sheet5.Columns("B").Find(CUSIP, LookIn:=xlFormulas, Lookat:=xlWhole) Is Nothing Then
ISTHERE = False
Else
[code].....
I would use the function like this in the spreadsheet:
=if(ISTHERE(A2)=TRUE,"Yes","No")
I get yes everytime. What am I doing wrong? Or am I even visualizing the answer correctly?
View 1 Replies
ADVERTISEMENT
Nov 15, 2009
I created this hyperlink function. It links to a1 of sheet 1 to a1 of sheet 2. However, when I click on the a1 cell in sheet 1. an error message appears. I have attached the spreadsheet...
View 2 Replies
View Related
Nov 6, 2008
I have a the following function: =INDIRECT(ADDRESS(SUMPRODUCT((F35:G45=K40)*ROW(F35:G45))-21,SUMPRODUCT((F35:G45=K40)*COLUMN(F35:G45))))
I'm trying to put the get the value of it from a different Sheet.
say this function is in Sheet1 and I wish to place the equation in Sheet3 - what should I change? I tried INDIRECT(ADDRESS(SUMPRODUCT((Sheet1!F35:G45=K40)...
nothing works.
what the function does? there are 2 tables. table 1 has values and table 2 has values as well. K40 is the user input --it reflects the number in table2 and the return value is the 'reference' in table1. for example, if table2 in F41 has the number 54 and the reference for it in table1 is $344, when the user types 54 in K40 the returned result in the function will be $344
View 4 Replies
View Related
Dec 9, 2008
I'd like to compare values from different sheets. My sheets contain data from different years. I have sheets named 2000, 2001, 2002, 2003.... I also have a sheet named "compare". Now I'm using functions like: =('2008'!J13/'2007'!J13)-1
which gives me the relative change between years 2007 - 2008 in the cell J13.
I'd like to use the sheet name as variable. For example: "year 1" is given in cell A1 and "year 2" given in cell A2. Then I could enter (for example) 2007 in cell A1 and 2008 in cell A2. How can I use these cell values in the function? I’ve tried something like: =('A2'!J13/'A1'!J13)-1. I assumed that 'A2'!J13 would be the same as '2008'!J13. It didn’t take me long to figure out that doesn’t work. What would be the right way to do this?
View 3 Replies
View Related
Jul 28, 2009
I need a function where the sheet-reference can be linked to a cell.
By other words can the content of cell A1 be sheet1, sheet2, sheet3 etc. The cell in B2 shall always point to cell b3 in the choosen sheet, but the sheetreference is dependent on the sheet refererred to in A1
View 2 Replies
View Related
Feb 8, 2008
I'm trying to use the value of a cell as the sheet name in the array range for my index function, pointing to data on a different sheet. Here is the formula I have now, which points directly to the other sheet (and works fine):
=INDEX('SheetName'!A4:BE189,MATCH(A87,'SheetName'!A4:A189,0)+36,54)
This formula takes the value in cell A87 and looks for it on the sheet called "SheetName", then returns the value in a cell down 36 cells and across 54 cells. This is perfect as is.
I want to be able to have it look something like this:
=INDEX('CellValue where CellValue=sheetname'!A4:BE189,MATCH(A87,''CellValue where CellValue=sheetname'!A4:A189,0)+36,54). I have tried using the INDIRECT function here to get it to read just the sheetname, but cannot seem to get it to work.
View 7 Replies
View Related
Nov 27, 2013
Each sheet contains the test data for an individual class and I am trying to create a "Totals" sheet where I can show the average that each class had on a particular test and the letter grade breakdown. I am trying to create one 'average' formula that I may then copy across that will change the sheet reference automatically without me having to manually re-create the formula every time I add a new class sheet. I tried using the INDIRECT function but could not get it to work. Keep getting #Ref error.
View 3 Replies
View Related
Nov 13, 2008
I need to include in my roster sheet that if a client is "present" my instructor will check the box. This (idealistically) should add +1 on the column labeled "classes attended" in sheet labeled 5 groups. I've been at this for 3 hours and still have gotten NOWHERE
View 5 Replies
View Related
Apr 21, 2012
I have a check box on a worksheet that when checked calls for a timer code from a module. This works fine however what I am finding is that the code in the module is applying the result all the sheets in the workbook not just the sheet where I have activated the check box. I am a novice at VBA and no doubt there will be a simple solution. How do I limit this to my active sheet. This is the code in the module
Code:
Public Sub Watch1()
If Sheet2.CheckBox1 = True Then
Range("AH2") = Range("AH2") + TimeSerial(0, 0, 1)
[Code]....
View 4 Replies
View Related
Apr 25, 2013
I have created a simple Macro to change the Tab color of a worksheet based on the value of a specific cell. This spreadsheet has many worksheets (>20) and this sheet I have used as an error detection. If it see's an error on some other sheet, this cell will change from "OK" to "Error". The Macro then changes the Worksheet tab color to Red. The Macro works fine but ONLY if that worksheet is the open/active sheet (which kind of defeats the purpose). How can I trigger this Macro when this Worksheet is not the active sheet? Here is a listing of the Macro
Sub Worksheet_Change(ByVal Target As Range)
Dim KeyCell As Range
Set KeyCell = Range("A11")
If KeyCell.Value = "OK" Then
Me.Tab.ColorIndex = 6 ' Yellow
Else
Me.Tab.ColorIndex = 3 ' Red
End If
End Sub
View 3 Replies
View Related
Oct 10, 2013
I have this MAXIF array function that I am trying to use but I need it to reference the Last Row and not the absolute refererence. I am a novice at VBA. The first max if array is the one with my effort to try and get the last row. It doesnt work. The second one works but references the cell.
Code:
Range("U2").Select
Selection.FormulaArray = _
"=MAX(IF('Monthly Production'!R2C1:RC1 & LR=RC[-20],'Monthly Production'!R2C19:RC19 & LR))"
Range("V2").Select
Selection.FormulaArray = _
"=MAX(IF('Monthly Production'!R2C1:R8729C1=RC[-21],'Monthly Production'!R2C21:R8729C21))"
View 1 Replies
View Related
Jan 29, 2014
I have 2 pivot table in 2 different sheet and i want to consolidate the data in one sheet.
Pivot table:1(order processed) as below
date
MR X
MR Y
MR Z
MR S
[Code].....
I need the data as below in separate summary sheet. 2 column in each employee(1 is processed and completed), i dont have option here to create 2columns here hence i put "/" in between.
date
MR X
processed/Completed
MR Y
Processed/completed
[Code].....
View 2 Replies
View Related
Aug 19, 2009
How should this read? So SheetName is the variable in the range funtion?
Dim SheetName As String
SheetName = ActiveSheet.Name
Set AllCells = Range('" & SheetName & "'!B7:'" & SheetName & "'!B60000")
View 9 Replies
View Related
Nov 5, 2009
I have a number of worksheets with data in various rows, all rows of data have UID's. I want to create a search function, which returns the location of the of the UID. Or better still the cursor will jump to the cell where the UID is located. It's very much like the way the 'Find & Replace' function works.
E.g. If I type the UID of 1234 into cell A1 I want to be able to press a 'Find' button (which will be located alongside cell A1) that will search the entire workbook for 1234.
View 9 Replies
View Related
Dec 7, 2006
Cell F4 contains a worksheet name which was “calculated” by an IF function (IF something, then ‘T2’, otherwise ‘T3’).
Cell F5 must then look at either sheet T2 or sheet T3 (depending on what it is told to do by reference to cell F4 just above) and report what it finds in cell A1 there.
Clearly I must use the INDIRECT function. But I have tried every imaginable combination of single and double quotation marks to produce the equivalent of
=T2!A1
all to no avail.
Is it something to do with letter and number combinations?
Alternatively, how else should I achieve what I want?
PS F4 could have been “calculated” by any other means, e.g. =MONTH(TODAY()).
View 9 Replies
View Related
Dec 2, 2007
Excell 2003
I put = cell("filename") in cell A1 on every sheet to display the full pathname of that sheet.
it seems that the path does not always display the correct sheet name- rather it seems
that when changing from one sheet to another the path is not always updated.
Is there a switch that needs to be activated to ensure that the path is updated correctly when changing sheets on the same worksheet?
View 3 Replies
View Related
Feb 14, 2008
I have a vlookup formula which can refer to any one of several sheets labelled by month.
I need to be able to show in a different cell which sheet (month) the formula refers to.
In other words - displaying part of a formula in a different cell.
View 3 Replies
View Related
Mar 18, 2008
How do I incorporate sheetnames into the vlookup function? I need the following sheet name: SALES (located in A1) to be incorporated into the function: vlookup("Sales"?,a1,n84,2,false). .
View 5 Replies
View Related
Apr 30, 2014
I'm trying to write a code so If Q2 on sheet1 equals " " then A2 on sheet2 equals E2 from sheet 1. If Q2 doesn't equal " " then " ". Also, I would like for this to work for the entire Q column, starting with Q2 down.
View 4 Replies
View Related
Feb 4, 2014
I want to create a formula that reads cell B6 of a different sheet. The sheet name is in cell A1, and I want to get the results in B1.
Later I will change A1, and I want to get in B1 the cell B6 from the different sheet. What is the formula in B1.
View 1 Replies
View Related
May 20, 2009
In sheet1 there are three columns
A1 : PO Number (for example 111001)
B1 : PO Line (for example line # 91)
C1: Amount ( USD 50.00 )
In Sheet2 there are three columns also
A1 : PO Number (for example 111001)
B1 : PO Line (for example line # 91)
C1 : Account Code ( For example AA.00.000,725001)
Now, I would like to use a function that brings the value of C1 in sheet 2 ( The Account Code) to d1 in sheet1 taking into consideration that the PO number may repeat but the line numbers is not repeating for the same PO. Attached is a sample for better illustration
View 4 Replies
View Related
Aug 17, 2009
I'm trying to apply a VLOOKUP function to my schedule sheet. Attached to this post is a copy of the sheet.
The shifts that I'm entering in B7:AC7 should be looked up in the table located at K21:Q25. I'd like the looked up value to display in B8:AC8.
View 7 Replies
View Related
Nov 14, 2007
I currently use the PROPER function for one column at a time. How can I apply it to a whole worksheet, preferably without creating new columns?
View 9 Replies
View Related
Mar 19, 2009
I want to concatenate two columns in a separate tab but when I do, the values appear as ....
View 9 Replies
View Related
Oct 9, 2013
I am trying to create a spreadsheet that uses a selection criteria based on different sheets within a workbook to output a costing quote, anything i can use as a template? I will post the sheet that i am working on that I need to combine into a working book.
View 2 Replies
View Related
Jul 23, 2014
how to properly write this kind of commands!
v_1 = Sheets("WB_Input").Cells(i, 2) 'It's gonna be a numeric value like 10
v_2 = "E"
v_3 = Sheets("WB_Input").Cells(i, j) 'It's gonna be a numeric value like 12
Sheets("WB_Output").Cells(i, j) = "=CONCATENATE(" & v_1 & "," & v_2 & "," & v_3 & ")"
Thing is once I look at the WB_Output Sheet what I see is an error and the cell shows this: =Concatenate(10,E,12)
So logically the problem is that I need to make it show up as =Concatenate("10","E","12")
Btw, I can't just put v_1 & v_2 & v_3, cause Excel understands "E" as exponential!
View 1 Replies
View Related
Feb 18, 2010
First I want to copy the calculations from sheet "Calc" to sheet "Cost" then in column J in the same row, the background color will change like conditional format on numbers. The code works when copy the calculations from sheet "Calc" to sheet "Cost" but the color function (codes in sheet "Cost") does not work after pasted in sheet "Cost". But the color funtion does works when enter numbers in Column J alone. I know there must be a simple codes that can do this while paste from other sheet. This code is in module
View 3 Replies
View Related
Oct 16, 2013
I'm trying to get the Median (and min/max later) of certain values on a different sheet. For example, I'm operating in one sheet and pulling the values from the sheet "Form Responses". I want a median for numbers when the values in column B are "Aransas" and the values in column D are Yes. The values are in Column F. My formula is:
=MEDIAN(IF('Form Responses'!B:B="Aransas",IF('Form Responses'!D:D="Yes",'Form Responses'!F:F,""),""))
It's giving me the median for ALL of the numbers in F and I can't figure out why.
Following that, I'll want a median for all the numbers in F when column B value is "Aransas" (in other words, dropping the Column D condition).
Excel 2010, Windows 7
View 1 Replies
View Related
Jul 8, 2014
I would like to copy values corresponding to a unique identifier from one sheet to another, using the vlookup function. The problem is that after a certain cell the values are given as N/A even though they are present in the sheet I want to copy them from.
View 3 Replies
View Related
May 21, 2014
Attached I have a document where I am wanting all of the individual sheet names on the Total page. Rather than having to change each formula to match the sheet name I believe there is a way to reference the sheet name column (AO) in the formula so you can drag it down to fill in the columns. I am basic with Excel and do not know how to add this indirect function into my current formulas.
View 5 Replies
View Related