Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Nigel Bennett
 
Posts: n/a
Default Finding last cell with data in a column

I am looking for something that will find the last cell of
data in a column, here is what I want to do

the function I have is

=if(a1=0,0,(b1-$cS10)*d1)

C10 is the total for that column

now that works fine on sheet 1 but on sheet 2 and then
sheet the total is in cell C23, due to the nature of the
spreadsheets I am coding it so the formulas get entered
each time by clicking a button. How do I find the last
cell containing data in column C and then use it in the
formula. Once I can find it on one sheet then I can find
it on the rest

Thanks
  #2   Report Post  
 
Posts: n/a
Default

http://www.xldynamic.com/source/xld.LastValue.html#vba

-----Original Message-----
I am looking for something that will find the last cell

of
data in a column, here is what I want to do

the function I have is

=if(a1=0,0,(b1-$cS10)*d1)

C10 is the total for that column

now that works fine on sheet 1 but on sheet 2 and then
sheet the total is in cell C23, due to the nature of the
spreadsheets I am coding it so the formulas get entered
each time by clicking a button. How do I find the last
cell containing data in column C and then use it in the
formula. Once I can find it on one sheet then I can find
it on the rest

Thanks
.

  #3   Report Post  
zackb
 
Posts: n/a
Default

You may also want to look he

http://www.vbaexpress.com/kb/getarticle.php?kb_id=417

http://www.vbaexpress.com/kb/getarticle.php?kb_id=418

You can disregards everything except the functions 'xlLastRow' and
'xlLastCol'.

Although I'd suggest changing one line in each UDF ..

WorksheetName = ActiveSheet.Name

... change to ..

WorksheetName = Application.Caller.Parent.Name

This ensures that the function will work in the worksheet setting and not
just in the VBA environment.

--
Regards,
Zack Barresse, aka firefytr

"Nigel Bennett" wrote in message
...
I am looking for something that will find the last cell of
data in a column, here is what I want to do

the function I have is

=if(a1=0,0,(b1-$cS10)*d1)

C10 is the total for that column

now that works fine on sheet 1 but on sheet 2 and then
sheet the total is in cell C23, due to the nature of the
spreadsheets I am coding it so the formulas get entered
each time by clicking a button. How do I find the last
cell containing data in column C and then use it in the
formula. Once I can find it on one sheet then I can find
it on the rest

Thanks



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
Return Count for LAST NonBlank Cell in each Row Sam via OfficeKB.com Excel Worksheet Functions 12 April 17th 05 10:36 PM
How do I sort a column of data and have each data row sort accordi Oedalis Excel Discussion (Misc queries) 1 March 18th 05 12:52 AM
how to create a variable column in cell reference Sampson Excel Worksheet Functions 3 February 21st 05 11:13 PM
same cell from multiple sheets into one column Kel Excel Discussion (Misc queries) 0 February 18th 05 01:53 AM
filling a forumla down a column from data across a row Doug Excel Worksheet Functions 2 December 9th 04 09:55 PM


All times are GMT +1. The time now is 09:36 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"