Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default find last non empty cell in a column and display value in msgb

Gary's Student

Drat this autoformatting! The example should be column A having dates,
column B having numbers.
What I need to do is show the value of column B in the the last row in which
column A is not empty in my message box. All I get with your method is an
empty message box?

"Gary''s Student" wrote:

Sub lvalue()
Dim n As Long, v As Variant
n = Cells(Rows.Count, 2).End(xlUp).Row
v = Cells(n, 2).Value
MsgBox (v)
End Sub

--
Gary''s Student - gsnu200830


"vbnewbie" wrote:

I have a column of numbers and wish to display the last non empty cell value
in the column in a msgbox. In rows where there are no values entered the
cells in this column have formulae until updated manually.
e.g.
Row Column A Column B
1 28/01/19 2106
2 30/01/09 2107 < value I wish to display in msgbox
3 =SUM(B2+1 )

I wish to add the value using a macro

Thanks in advance

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
find last non empty cell in a column and display value in msgbox SeanC UK[_2_] Excel Programming 1 February 2nd 09 12:12 PM
find empty cells in a column then append row that empty cell is in vbnewbie Excel Programming 9 January 29th 09 09:27 AM
Test for 1 occurances meet same criteria. Display address in MsgB John Excel Programming 0 August 28th 08 01:07 PM
find next NOT empty cell in column Max Bialystock[_2_] Excel Programming 2 July 25th 07 09:55 PM
Find First empty cell at end of Column A DG Excel Programming 7 December 19th 06 06:20 PM


All times are GMT +1. The time now is 07:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"