Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do i find the last entry in a column where every cell is not .
I have an excel worksheet that keeps track of our gas inventory. We get gas
delivered once a week and when its delivered we post the price. I wind up with a column that has prices and non entries. Month End i need the LAST price we were charged to produce a report. It would be nice if Visual Basic had a function called Last but alas I have not found it. I have to do a lot of gyrations to get this data. Does someone know an easy way to get this data. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do i find the last entry in a column where every cell is not .
Hi Beau Black,
Try: Sub Tester() Dim LastPrice As Double Const Col As String = "A" '<<===== CHANGE LastPrice = Cells(Rows.Count, Col).End(xlUp).Value MsgBox LastPrice '<<==== For Test purposes only End Sub Change the value of Col to accord with your column. --- Regards, Norman "Beau Black" <Beau wrote in message ... I have an excel worksheet that keeps track of our gas inventory. We get gas delivered once a week and when its delivered we post the price. I wind up with a column that has prices and non entries. Month End i need the LAST price we were charged to produce a report. It would be nice if Visual Basic had a function called Last but alas I have not found it. I have to do a lot of gyrations to get this data. Does someone know an easy way to get this data. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do i find the last entry in a column where every cell is not .
Hi
see: http://www.xldynamic.com/source/xld.LastValue.html -- Regards Frank Kabel Frankfurt, Germany "Beau Black" <Beau schrieb im Newsbeitrag ... I have an excel worksheet that keeps track of our gas inventory. We get gas delivered once a week and when its delivered we post the price. I wind up with a column that has prices and non entries. Month End i need the LAST price we were charged to produce a report. It would be nice if Visual Basic had a function called Last but alas I have not found it. I have to do a lot of gyrations to get this data. Does someone know an easy way to get this data. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do i find the last entry in a column where every cell is not .
Hi
Adding: If you by Last mean "last entered, but not necessarily downmost" then you need a date-time-stamp or similar in the neighbor column. HTH. Best wishes Harald "Beau Black" <Beau skrev i melding ... I have an excel worksheet that keeps track of our gas inventory. We get gas delivered once a week and when its delivered we post the price. I wind up with a column that has prices and non entries. Month End i need the LAST price we were charged to produce a report. It would be nice if Visual Basic had a function called Last but alas I have not found it. I have to do a lot of gyrations to get this data. Does someone know an easy way to get this data. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
How do i find the last entry in a column where every cell is not .
Well the easiest way out: 1. In the worksheet, chose a conveninet cell where you want to display the last price enter. Name this cell as "LastPrice". 2. In that worksheet_change event procedure add following code: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 6 Then Range("LastPrice").Value = Target.Value End If End Sub Above is assuming price is in coloumn 6 (F). Change the coloumn number accordingly. Sharad *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find first entry in a column | Excel Discussion (Misc queries) | |||
In a column of numbers I need a function to find the last entry | Excel Worksheet Functions | |||
How do I find a column entry closest to a particular value | Excel Worksheet Functions | |||
How do I find a column entry closest to a particular value | Excel Discussion (Misc queries) | |||
Function to Find Last Non-Null Entry in a Column | Excel Programming |