How To Lookup Row # Based On Content Of Another Column's Cell
I have a 3 column table with 20 rows. The first two columns contain travel
expense data. The cells in the third column are blank exept for whichever
cell I enter an "x" in. Please let me what formula or worksheet function do
I use to calculate the travel expenses based on the data in the first two
columns that correspond to the row of the cell with an "x" in the third
column?
View Complete Thread with Replies
Sponsored Links:
Related Forum Messages:
Lookup Data Based On Cell Content
I am setting up a worksheet (1) with a full list of part numbers supplied, cost etc. ie: Part Description Price Qty 1234 Blah Blah £1.00 1 1235 Blah Blah £3.00 0 1236 Blah Blah £2.00 2 And I have set up a seperate worksheet (2) as an invoice. What I have been trying to do is when I enter a qty in worksheet (1), worksheet (2) will reconise an entry in the qty colum an copy selected fields/ cells. I can do a "=" or use an "if" statement looking at anything greater than "0". but is there a way I can get the invoice worksheet to ignore any lines with "0". So it will only copy over the information with only qtys for the invoice ?.
View Replies!
View Related
Formatting Row Of Cells Based On A Cell Content
I want to format a range of cells based on the name listed in a cell in column A (starting @A6). I currently do this manually. It is to help me visually see the line I am working with and for what person. I am almost certain that is going to take a VBA, but I know little to nothing about setting one up. I have attached a sample. I am using Excel 2003.
View Replies!
View Related
Adding Multiple Row Contents Based On The Content Of A Single Cell
Been trying to work this one out and have ended up banging my head against the wall. Basically I have a spreadsheet, in the first column is the person's name, in the secon which team they are in and following this a cell for each day of the month with their availability. The team name is a selection from a list, the availability is 1-6 (different levels of availability) I'm trying to do subtotals at the bottom for each separate team, so the very last row each of the cells for each is added up: Name Team 1st 2nd 3rd 4th 5th 6th 7th etc. Mr X ___1st___1______2__1 Mr Y ___2nd_______2________5__5__5 Mr Z ___1st___1____________3__3__3 Total 1st: 2 2 1 3 3 3 Total 2nd: 2 5 5 5 So basically the formula in the last row goes along the lines of: Add each cell in the column IF the team name = 1st
View Replies!
View Related
Paste A Value Within A Row Based On Column Lookup Containing Dates?
I'm looking to create a small section of VBA code on Excel 2007 that looks for a specific date on a column and then pastes a value on the correct row. I have weekly dates in columns along the top of my spreadsheet on row 3: C3 = 07/11/08 D3 = 14/11/08 E3 = 21/11/08 etc... The row further down the spreadsheet that I wish to use is selected by previous code and could be any row number within column B. I need a snippet of code that searches for a particular date along row 3, and then once it finds the correct column, it pastes the value in the corresponding cell on my active row. For example, if my active cell/row happens to be on B18, and the date I'm looking for happens to be on L3, I need to paste a value into cell L18. I imagine there needs to be some form of HLookup, but I've no idea how to implement this in VBA code.
View Replies!
View Related
Highlighting Active Cell's Row, Along With Any Row That Shares Same Value In That Column
Is it possible to click on a cell in column C, and have the wishlist below happen: That active cell's row is hightlighted. Any cell in that column that has the same value as active cell is also highlighted. Plus, any cell in another sheet that has that value it's row is highlighted too. Example: I click on C5 in Sheet 2 its value is 45000789 it row is highlighted, this value also appears in C3 in the same sheet, so it's row is highlighted as well. Plus, in sheet 1 in C10 this value appears and it's row is highlighted as well. When any of the values are clicked again the highlight is removed from all parties.
View Replies!
View Related
Using 'IF' With Conditional Format (change Cell Color Based On The 'P' Or 'F')
My cell has a 'P' or an 'F' plus some additional text. I'm trying to change cell color based on the 'P' or 'F' but I can't get it to recognize the letters. Samples of what I've tried: =IF(LEFT(L23,1)=P) =IF(MID(L23,1,1)=P) etc. I can 'FIND' the 'P' or 'F' but there may be a P or F else where in the cell so the color may come up incorrect. I'm trying to get it to just look at the first character in the cell. Can the 'IF' be used with CFs?
View Replies!
View Related
Lookup Column Header Based On Cell Value
I have a spreadsheet an excerpt of which is as follows: K L M N 1 Doors Security Vehicle Key 2 TRUE FALSE FALSE FALSE 3 FALSE TRUE TRUE FALSE 4 FALSE FALSE FALSE FALSE Want I want to happen is to return the column header where there for a cell which contains "TRUE" in a blank column. If there isn't a cell with the value "TRUE" then to return "N/A". In the above example in blank column P for Row 2 would be "Doors", Row 3 would be "Security,Vehicle" and Row 4 would be "N/A". In my actual spreadsheet I have 12 columns (L to W) which have the TRUE or FALSE values. I know it has something to do with either HLOOKUP, INDEX and MATCH but can't seem to get it right. Any ideas?
View Replies!
View Related
Lookup Column Header Value When First Cell Is Populated In A Row
i have a manpower chart with months along the top and names down the far left. People are going to start work in different months so i want to know at the side of each persons name the month they start. Does that make sense? Heres a simple example I have column headers starting at B1 thru F1, with the following values Month1,Month2,Month3,Month4,Month5 In cell D2 i have the value 1 I want Cell A2 to return the value Month3 Whats the formula i need to input in A2
View Replies!
View Related
Conditionally Lock Row Based On One Cell's Contents
I'm trying to figure out how to lock a range of cells (all in a row) when some puts a specific character in one of the cells. I have a sheet where I want people to enter data. Once they put a 'C' in the last column to indicate that the entry is complete, the whole row should be locked so they can't change any of the cells for that entry. There are some good pointers already on the forum to help me get the basics: Conditional Cell Lock Unlock http://www.ozgrid.com/forum/showthread.php?t=66397 http://www.ozgrid.com/forum/showthread.php?t=76379 However, all of these point to specific cells rather than a range of cells that can be located close to the target of the change.
View Replies!
View Related
Lookup Data In Row & Cell Based On Data In Row And Cell
I am looking for a way to do what i would call a dual vlookup. i have some data in a number of sheets and need to do some consolidation into a summary sheet. problem is, not all the sheets have data in the same columns and rows but all the data is the same. what i am trying to do is something like vlookup("a",sheet2!A:M,***need to put the column of the data here***,0) i cant just put in the column number because it changes on each sheet, need some way to do another lookup there, like an hlookup or something, so that i could lookup which column contained 'sales' and return that number so it can be put into the vlookup.
View Replies!
View Related
Find Cell Based On Column And Row
I have a spreadsheet which has about 100 different SKUs in column A and the inventory for each SKU by period in columns B:Z So for example B would be P1W1 and C would be P2W2, etc what kind of lookup function would I use in VBA to find per say, the value of SKU #: "27017" in P1W2 ? Apart from pivot table.
View Replies!
View Related
Add Value Based On Cell Content
I have a named range (D:16 F:800) called “NameRange” which contains names. I’d like to create a macro which offsets a letter “x”, 10 columns to the right everywhere that name appears within the range. As an example: If I’m trying to find the name Tom, A dropdown menu shows the name “Tom” ( which I’ve created) whereby it calls upon a script to search within the named range from this: Bob Kim Tom Tom Sue Mary Bill Ted Tom Sue Bob Fred Bill Sue Bob Tom Kim and offset “x” to look like this:.......
View Replies!
View Related
Formula To Return The Value In A Column Based On Cell Entry In Row
Trying to write a formula that looks for the first number in the same row, then returns the value in that column in a different row. In the example included, cell A-7 should contain the formula. Within row 7, determine the column where the first number is listed (column D in this case), then return the value listed in row 3 of that column ('C' in this case). I've tried Lookup, Index, and Match functions, but can't seem to get the right combination.
View Replies!
View Related
Lookup Row In Column & Heading In Row
I'm trying to enter info in a cell based on what is entered in two other cells. So I have a dropdown box for the species on another sheet as well as a dropdown box for rail sizes. Then I have to crossreference them to come up with an upcharge number. Sorry for my basic lingo. I hope it's understandable.
View Replies!
View Related
Deleting Rows Based On Cell Content
I wish to remove the page headers that were imported along with the raw data. Here's the code I've been using. Column_To_Check = 3 Start_Row = 1 End_Row = ActiveSheet. Cells(Start_Row, Column_To_Check).CurrentRegion.Rows.Count MsgBox End_Row Search_String = "." For Row_Counter = Start_Row To End_Row If ActiveSheet.Cells(Row_Counter, Column_To_Check).Value <> Search_String Then ActiveSheet.Rows(Row_Counter).Delete Row_Counter = Row_Counter - 1 End If Next Row_Counter End Sub When I import the data from the text file, there are 3 dimensions separated by a period in the same field. I.E: ABC.DEF.GHI and I use the break points to seperate as such: ABC|.|DEF|.|GHI|. Therefore, all rows that contain data also contain a period in cell C, but headers don't. The Problem End_Row = ActiveSheet.Cells(Start_Row, Column_To_Check).CurrentRegion.Rows.Count CurrentRegion only selects up to the first blank row. However, I need this to select the whole sheet, not just the current region.
View Replies!
View Related
Format Border Based On Cell Content
I have a dynamic table (rows regularly added or deleted) that is generated automatically based on choices made by the user in another worksheet. I need a function that will examine all the cells in one column, and when it finds a difference between two cell entries, it will change the border between these two entries to dark (medium weight), and then extend this border across the table. The end result should be that wherever the cell contents differ within a column, the table is divided by a darker border across the entire row.
View Replies!
View Related
Run Macro Based On Cell Content
I have a drop down list made from the Forms toolbar with a list of items: 1, 2, 3, 4, 5. I have set it with a linked cell, so when you choose, say 3, from the dropdown, 3 appears in B10. I was hoping to add a 'Go' button, which would run another macro depending on what is in B10, i.e. so if 3 was chosen, then you press 'Go', Macro3 would be run. So I have 5 macros called Macro1 - Macro5, and I need some code for the 'Go' button which will run the right macro depending on what number is in cell B10.
View Replies!
View Related
Setting Colour Of Cell Based On Content
I have inherited a spreadsheet from someone else that rather cleverly (in my humble opinion) sets the colour dependant on the contents. ie negative value is red, zero is amber and positive is green. i like the idea and would like to use it on a spreadsheet of my own, but have tried to find out how it is done and can't!
View Replies!
View Related
Changing Cell Content Based On Button
I have created two buttons in a worksheet to navigate to two other worksheets. I would like a cell to display 'YES' automatically if one of the two buttons is clicked and or to display 'NO'. I also would like to change the colors of these cells change automatically depending on which button is pressed.
View Replies!
View Related
Conditional Formatting Based On Cell Content
I am trying to format cells based on what is in them across the board. Is there a way to conditional format based on what is in certain cells? I have 5 columns. I need to color in every NA only in the rows that have 1 or less cells with a number in there. So if there is 2 cells in that one row that have a number in them then leave the whole row white. If there is only 1 number in that row and the rest are NA then color all the NA's in red......
View Replies!
View Related
Drop Down List Based On Cell Content
I'm trying to find a macro that will allow me to enable several drop down lists in the same cell based on the content of another cell. In other words: If cell A1 is the data entry cell, and the user enters "cat" Then cell B1 will display a drop down list of previously grouped options: "mouse, bug, bird" If in cell A1 the user enters "dog" Then cell B1 will display a different list of previously grouped options: "mole, rabbit, kibble"
View Replies!
View Related
Display Image Based On Cell Content
I'm trying to display a different image based on the contents of a cell. For example if cell A1 = "Gerrard" I would then like to display a picture of Steven Gerarrd. Is this possible? If so can anyone give me a steer in how I might acheive this.
View Replies!
View Related
Select Sheet Based On Cell Content
I am trying to do some thing simple, but i causes me a lot of problem in several areas. I am using the sheets( range("c5")).select to simply select the sheet that is named in cell c5 on the current sheet. can anyone give me a correct way to accomplish this that I can use in other applications that i come accross?
View Replies!
View Related
Return Number Based On Cell Content
I have a questioner in a excel spreadsheet. Column C have yes or no answers. If answer yes is implied then I want the number 2 to appear in Column F of no is implied then the number 3 will appear. I am having trouble writing the language for this.
View Replies!
View Related
Deleting Content Of A Cell Till The End Of Right (Not Row)
I need help on Excel 2007 Macro , the below coding searches for a string "recvtiming" in a cell as a wildcard and delete it entire row once it founds it in a single active sheet. Question, 1. How do I manipulate it to search for the same string and upon finding a) Delete its cell content and all the contents from its right hand of side till its last column which have a value from the same row on all 50 sheets in the workbook. e.g a b c d recv 0 1 2 3 4 It should return, a b c d
View Replies!
View Related
Cell/Range Names Based On Row & Column Intersection
i have a table in excel with 36 rows and 36 columns i.e. 36x36=1296 individual cells. Columns and rows have headers/labels i.e. 36 rows with row label headings and similarly 36 columns with column label headings. I would like to automatically create unique cell names for the 1296 cells based on where the columns and rows intersect using the row and column labels. The cell name format I would like to create is [ColumnLabel_RowLabel]. I've manually created the cell names in the attached file as an example of what i would am seeking (i've greyed the cells that I've done this for).
View Replies!
View Related
Move The Content Of Cell From One Column To Other
I want to enter a number 0 to 999 in cell A1 and when the enter key is pressed move the contents of cell A1 to A2 and A2 to A3, cascading down until A40. So after five numbers the first number I entered woul now have cascaded down to cell A5 ready to go into cell A6. Would I have to use some kind of program or does excel have a command for this?
View Replies!
View Related
Does Cell Content Exist In Column
I do have a problem with my excel sheet. i have a workbook with 2 sheet which i need to compare a colume of data from sheet1 with sheet 2 colume M2. If it is matched, then sheet 2 colume BJ2 will return a "F" else "N" So i was thinking of using an If formulae: =IF(M2=sheet1!A2:A16),"F","N") but somehow the above text return a msg of "A16" is invalid. and i tried to used VLOOKUP by defining the mapping sheet as "KEY" =VLOOKUP(M2,KEY,A2) and i copy and paste the above formulae to the remaining column M for comparison. Somehow, this did not work as well.
View Replies!
View Related
Change Cell Color Based On Cell Content
I have a chart full of different names which I need to separate them by color when a specific entry is found in a Cell. For example the list has the store name "ZELLERS" + its branch number. (ex. ZELLERS #276 PL or ZELLERS #295 SL and so on). I would like to modify the below code so that It only check for the name ZELLERS and not the branch number. If it finds ZELLERS in any cell In the Range of C1:C500 then color it Red. Below Code does that but I have to write the exact name as it appears in the cell otherwise it wont find it for me. Is there any way to resolve the issue? I am not an Excel Programmer but Only an Excel user. Option Compare Text Private Sub Worksheet_Change(ByVal Target As Range) Set r = Range("C1:C500") If Intersect(Target, r) Is Nothing Then Exit Sub End If On Error GoTo Endit Application.EnableEvents = False vals = Array("ZELLERS #276 PL", "ZELLERS #295 SL", "Gopher", "Hyena", "Ibex", "Lynx") nums = Array(3, 46, 6, 3, 7, 4, 20, 10, 23, 15) For Each rr In r..........................
View Replies!
View Related
Assign Names Dynamically Based On Cell Content
I do have a data set from A1:C8 as follows:- Brand Name(A1)Sales Value(B1)Margin(C1)Levi's100002000Arrow150002500Allen Solly120001300Hanes80001000John Miller250004500Disney280003200Ray Ban180002100 The above brands are categorized as follows:- Brand NameProposed CategoryLevi'sConsignmentArrowBrandAllen SollyBrandHanesBrandJohn MillerPrivate LabelDisneyBrandRay BanConcessionaire I would like to put formula from D1:D8 in such a way so that the Proposed categories are extracted automatically through formulae. This will help in getting the contribution calculated from different categories. Brand Name(A1)Sales Value(B1)Margin(C1)Category(Desired Result)(D1)Levi's100002000ConsignmentArrow150002500BrandAllen Solly120001300BrandHanes80001000BrandJohn Miller250004500Private LabelDisney280003200BrandRay Ban180002100Concessionaire
View Replies!
View Related
Macro For Saving Filename Based On Cell Content
Is it possible to create a macro attached to a button that allows me to save the workbook based on content of 2 cells in the workbook? I like to save the workbook based on content of cell A4 that contend a text string. After that saving another time with the contend of cell A4 plus cell A9 which contend the today() function. I am doing this because this workbook is constantly updated and a backup copy is done based on the date the file is save.
View Replies!
View Related
External Data Query Based On Cell Content..
I have a sheet which is running a a query against an external source, and coming back with a list of client data. Each row is an investment with it's own unique InvestmentID number and a ClientID number. Each client has their own unique ClientID, however may have multiple investments (InvestmentID) linked to their ClientID (does that make any sense?!). Anyway, the query I have returns ALL investments. I know how to manually change this to only bring back certain client(s), however I want to be able to have the users (who don't know what a query is, yet alone to how to use/edit one) enter a ClientID into say, cell B2 and have the query reflect that ClientID. If they have to click a button to run a macro after entering the ClientID, so be it (although it'd be great if it actioned once they hit "Enter"). I know this is possible because I've used something similar before (that someone else created!). What I don't know is... if I had multiple "entry cells", could I have the query filter by two (or more?) ClientIDs? That is, they enter the first ClientID in B2 and the second ClientID in C2, the query then returns all information relating to B2 or C2
View Replies!
View Related
Select Range Based On Variable Cell Content
Based on if the value in col A contains the characters "TT" I want to select the range starting with this cell and ending at the end at the end of the row I'm using (.End(xlRight) and then merge these cells, change colors etc. And then looping this through a 'range' so that it only occurs where the values occur. I can amend various cells based on this idea, but am unable to identify the range and then merge the cells.
View Replies!
View Related
Remove Cell Content Based Upon Not Starting With A Word
I am working on a macro and, as part of it, I would like to look at column A of my spreadsheet and remove all cell contents where the text in the cell does not start with the word "total." For instance, if the text of a cell in column H is "total money" I would like it to remain unchanged. However, if the text of a cell is "George Baker" I would like it removed. I ONLY want the text in column H to be considered ... no other column.
View Replies!
View Related
Automatically Expand Row Depth To Show Cell Content
I have a spreadsheet with a master front page, which basically copies the contents of other cells in other sheets for it's own content. ie:- the formula in cell E16 on the master sheet is ='Sheet 7'!$B$16 (Please note that cell B16 is actually a merged range of B16 to H16) Everything works fine until such time as the orginal cell contains an amount of text which is deeper than the cell on the master page eg cell B16 on sheet 7 is 330 pixels deep while the cell E16 in the master sheet is only 16 pixels deep. What I would like to happen is for row 16 in the master sheet to expand in depth by whatever is requried to automatically show the full content of B16 on sheet 7.
View Replies!
View Related
Copy 'x' Cell Value Evey Nth Cell Along On Same Row
Have often used this site, but now need an answer to something a little more specific. I would like to create a forumlae/function that would allow me to copy a cell value 'x' into every 'y' cell along. e.g copy cell x every 3rd cell along (in same row). The formulae must allow for 'y' to be of any value between 1-5 as this can change. I have attached a screenshot, as pictures are probably much better than my text above.
View Replies!
View Related
Range Object/property: Calculates 2nd Column Based On 3rd Column's Number
I'm trying to write a code that calculates 2nd column based on 3rd column's number or vice versa based on the condition set on the 1st column. Below, there are two procedures. "SimpleCalc" and "SimpleCalc2". I first wrote SimpleCalc2, but it isn't working, so I worked around the error by writing SimpleCalc, which selects a cell and moves around by offset. I personally find it hard to read and error prone as I develop more logic around it. I'm trying to develop more function based on this code, so I need to make it neat and flexible. what I'm doing wrong in SimpleCalc2? Or do you have any suggestion to improve the code "SimpleCalc"? I'm using Excel 2003. Sub SimpleCalc() Dim SimpleMethodRng, SimpleMethod As String, i As Integer ActiveWorkbook.Worksheets("Dashboard").Range("P5").Select SimpleMethodRng = ActiveWorkbook.Worksheets("Dashboard").Range("N5:P12") For i = 1 To 8 SimpleMethod = SimpleMethodRng(i, 1).........
View Replies!
View Related
Function To Sum A Column's Entries Based On Another Column
Let's say I have a dataset with blank or X in column A, and a dollar value in column B. I want to sum the dollar amounts for column B only if there is a corresponding X in that row in column A. The way I currently do that is by creating a new column C, making a if statement to display the value of B only if there is an entry in A, and then doing operations on that new range. I figure there has to be an easier way. I don't know how to use VLOOKUP, despite trying to read the helpme a bunch of times. Is that relevant?
View Replies!
View Related
Subtract Cell From Others Based On Cell Content
I am trying to create a formula that will compute a variance between the numeric value in a given cell with the value in one of 3 other cells depending on the condition of the 1st cell. Example: If the Value in cell F4 has a condition defined as "PMR" in cell C4, subtract the value in cell F19 from F4. If the condition is defined as "DBR" in cell C4, subtract the value in F20 from F4. And if the condition is "OTH", subtarct the value in F21 from F4.
View Replies!
View Related
|