Find Last Occurence Of Value And Return Balance From Another Column
Jul 24, 2006
I am trying to create a run balance sheet (see attached sheet). Column C has a list of job numbers, with column D showing the reqd quantities. Once the job is run, the qty is entered in column F and either a balance or the word complete returns in column H. My problem is, is that, when a job with a balance attached to it is re-run, that balance should be returned in Column D.
Ie 574361 has a total of 707 of which 320.4 was run, leaving a balance of 386.6.
When I type in 574361 again, I need column D (in the cell next to the job number)to automatically locate the last reported balance and return its value.
I have tried VLOOKUP and INDEX, but cannot get the thing to return.
I have attached a sample file. What I need the formula to do is lookup the value in Column A on 'EE Data Sheet' (which has multiple occurances of the same value) and give me the corresponding value in Column E (ID #) only if the date in Column K (Service Dt) is greater than 7/21/2008. The return value needs to be on the '151_SD Sheet'.
In other words, I need the ID number from Column E on the 'EE Data Sheet' returned to me on Sheet 151_SD for each occurrance of 1806-151 (Column A on EE Data Sheet) only if the date in column K is greater than 7/21/2008. The areas highlighted in yellow show the data to be returned on the 151-SD sheet. I tried vlookup & match and hlookup & match, but I only got the first occurance of 1806-151.
In a sheet showing 4 columns,a debit column,a credit column,a sold and a 4th column.I need in D3 a formula which calculates the balance of the first in first out balance,by diminishing the credits from the first debit and therefore to sold what remains from the 1st debit,once the first debit is settled ,then to sold the remaining from 2nd debit and so on,beside the formula in E3 I need a formula which returns the reference of the cell of which the remaining sold refers to.
Private Sub cmdShowdata_Click() Dim Tgt As Worksheet Dim Source As Range Dim wbSource As Workbook Dim cel As Range Dim rng As Range Dim c As Range Dim i As Long Application. ScreenUpdating = False Set Tgt = ActiveSheet Set wbSource = Workbooks.Open("C:Documents and SettingsDesktopStaff Recoed 2") Set Source = wbSource.Sheets(1).Columns(1) With Tgt .Activate 'clear old data Range(.Cells(3, 2), .Cells(200, 5)).ClearContents ' Loop through names in column A For Each cel In Range(.Cells(3, 1), .Cells(Rows.Count, 1).End(xlUp)) If Not cel = "" Then...................
The above vba command which is extract the data from the Other workbooks. It looks for the "Staff 001", "Staff 002"...these parameters to transfer the data to the worksheet. But, the "Staff 001" data must appear twice in each workbooks. If i use the above command, i only can extract the FIRST "Staff 001" average data. But SECOND "Staff 001" average data cannot extract. I know it may be use FindNext method to do this but i am not sure how to write it
I have another challenging solve for a VBA macro. So here it goes, as I have become frustrated trying to make an array formula with no joy. On my sample worksheet provided below this is what I am trying to accomplish:
(Solution cells) B4:I4 looks to the (Combination cells) M5:R10 for a match If a match is present then cell J4 gives a "win" , If no match then cell J4 gives a " lose ".
Next if a win is present in cell J4, then cell K4 looks for when the draw number that matches occurred on from cells A4:A10, then subtracts the two(e.g. solutions cells from combination cells) to give the actual " # of draws to a win ". If no win is present in cell J4, then the default is zero for cell K4
The formula would be copied down thru cells J4:K12
Please refer to sample worksheet attached so that you can understand more clearly of just what I'm trying to do.
For the small database in my example workbook, I would like to apply credits earned at a later date to the oldest charges and create a "To Date" balance. After creating the "To Date" balance, I would like to select the smallest "To Date" balance as a way to identify the first charge that has no payment. Please see the attached for more clarity and additional information. The last column shows the desired results.
I have excel data like from b3 to b35 there are different dates with different months and years in long date format and from G3 to G35 expenses in accounting format. what i need is the ONLY last month expense in another worksheet.
need a formula that will give me a balance at the end, needs 2 columns with charges and credits and it allways give correct balance total on last column. have not used Excel for long time and forgot.
I have are two worksheets, "Sheet 1" which is a bill of lading form and "Sheet 2," in which columns A and B contain Part Numbers and Weights respectively.
What I'm wanting to have happen is when a user inputs a part number into Sheet 1 (say in cell B6), it calls a UDF that looks up the part number on sheet two column A and returns the corresponding weight from column B (to say cell C6 on sheet 1).
I have an excel sheet I am working on and in columns F1:F2000 I have an IF statment, I need to be able to add more "IF"s to it but I will exceed the 1024 char limit. Is there a way I can put this formula into VB as a function called DocumentType() and then in excel F1:F2000 =DocumentType()?
I would like to use a macro to find a number in a worksheet, other than the worksheet i'm using the macro in. The number - in this case a material code located in Column A - must be entered by the user in an inputbox, and then return (copy&paste?) the value of another cell (the price of the material - in Column D) in the same row.
I recorded a macro envoking the find function, but then it only finds the number which I used during the recording. How do I change the code so that the user can input any number, or what code must I write?
I am drawing a complete blank of this one. I know it can be done but I can't seem to remember how I did this in the past.
I have a sheet that has cells A1 at MB, A2 as ML A3 as MD
Then in cells B1 I have MB,TL then in B2 I have ML and then B3 is Blank this time.
Then in cells C1 I have Jim, C2 has Jack, and C3 has Fred.
What I want to do is have a formula that is in cell D1 that looks at the value in A1 and finds that value in Column B and if it is found return the value in the same row in Column C. In the example it would show Jim since MB is found in cell B1.
I have is a cell with a begining balance and a cell witha current balance.
I also have a column in which each expenditure will be placed ina cell in that column in sequential order.
What i want to do is take the value in the first cell of the expenditure column and subtract it from the begining balance and the place the result in the current balance.
But after the first cell i will need to subtract each value from its previous value to continue counting down so to speak.
I am at a loss on how to move the last value which will also be the lowest value in the column to the cueent balance cell.
My balance column is formulated for 60 rows. I am currently on row 23. The balance is repeated down the entire sheet range I have set. How do I keep the balance from showing next to an empty row without losing the formula?
I have attached a file to make this easier. Basically I would like to search "Points Scored" (B2:W9) for the highest score (which I already have done) and when it is found return the team's name that is associated with it. Then do this for the second, third, etc. as it can be seen in the "Main" sheet. I'm thinking an index/find approach, but I just keep getting "N/A".
I've got a spreadsheet with various amounts in cells A3:L5. I want to find the last non-blank entry in each row but only where the entry is in a column headed "Guaranteed PRB" (found in row 1). Then I want it to return the column header title found in row 2, which is a date.
I've attached a sample of the spreadsheet with the expected answer in column M.
I have one Column (Col A) which has a list of values. In Col B I would like to filter out the values in Col A based on some criteria. For example, below I would like Col B to show all of the records in Col A where the LEFT six characters = "Active".
Col A: Inactive_Jim Active_John Active_Frank Inactive_Betty Inactive_Lucy Active_Tina Inactive_Jill Active_Tom
Col B would result in: Col B: Active_John Active_Frank Active_Tina Active_Tom
I'm sure this is elementary, but I can't seem to figure it out.
I need a formula to find the maximum value in C1:E9 and return the corresponding number in column A. In this instance, the answer would be 12. I've been trying to make it work with a combination of Offset and Max formulas, but since the maximum could be in any one of three columns, I don't know how to make it work.
I need to create a formula that searches column E for text, let's say "BANANA", and when it finds that text, the formula returns the numerical value of the cell in that same row in column B. Let me know how this can be done.
I need to write a conditional formula that will look up in a 2nd worksheet the last coloumn with data (note that there will be some coloumns in the row that will have data and some that will be blank, I need the last column for that specific row to be the return result)
I am having trouble with getting a value (which is the row and column value) from a set of numbers. I have attached an example table to try and make things clearer. What I have is a table with a set of Row Headers, and Columns Headers all numeric. e.g Columns headed 1, 2, 3, 4, Rows 30, 40, 50 etc. I want to find the 1st occurrence of a value e.g. 1.0 in the table (by 1st Up mean closest to top left), and then give me the value of the Row and Column Header that corresponds to that.
So for the example attached, I want to get the row Value 200 and Column 6 from finding the 1st occurrence of the number 1. I have tried various combinations of index and Match etc. But I can't get my head around the fact that the position of the 1st no. 1.0 can change, therefore I can't use any releative positions etc.
i tried using the lookup but it gave a different result. i want to search a value from sheet1 A to sheet2 A and copy the remarks from sheet2 B and paste it to sheet 1 B and if not found leave it blank.