Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default variables in last cell

this one is a little bit different this time,

i need to output a variable from vba to the next
available cell in a column in my worksheet, any help
would be much appreciated.

thanks guys
Josh
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default variables in last cell

Josh,

Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).Value = myVar

puts it in the next available cell in column A

--
HTH

-------

Bob Phillips
... looking out across Poole Harbour to the Purbecks


"josh" wrote in message
...
this one is a little bit different this time,

i need to output a variable from vba to the next
available cell in a column in my worksheet, any help
would be much appreciated.

thanks guys
Josh



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default variables in last cell

var = 21

set rng = Cells(rows.count,1).End(xlup)(2)

rng.Value = var


Change the 1 in Cells( ,1) to the column where you want the value.

Regards,
Tom Ogilvy


"josh" wrote in message
...
this one is a little bit different this time,

i need to output a variable from vba to the next
available cell in a column in my worksheet, any help
would be much appreciated.

thanks guys
Josh



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
Using variables within a formula in the same cell. bbhart Excel Discussion (Misc queries) 5 August 28th 07 12:14 AM
Need Destination cell to ref origin cell, but w/ many variables..H Ms.shopalot Excel Worksheet Functions 4 May 4th 07 09:31 PM
Using variables in a cell/formula Wayne Knazek Excel Worksheet Functions 1 July 6th 06 05:30 PM
Cell Variables and Ranges jcottam Excel Discussion (Misc queries) 2 March 31st 06 07:33 PM
cell variables in IF formula Micayla Bergen Excel Discussion (Misc queries) 5 June 6th 05 08:09 AM


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