Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Some VBA questions about cell selection

Believe it or not, I am actually trying to write this VBA for my mother.
She does attendance forms for her school each week and after she is
done has to write some formulas in...unfortunately she is less adept at
excell formulas and usage than I am with VBA. So here is what I am
trying to accomplish.

1. I need to some how have excell figure out what the last used row in
column A is, skip a column and then write in a formula....I can write
in the forumla just not the other stuff.

2. On that same row I need it to verify what is in row 2 of any given
column and based on that value return a forumla to that cell.

This is probably easy for most of you but I am just learning so bear
with me.

Thanks,
Jason Self


---
Message posted from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default Some VBA questions about cell selection

Jason,

I think you're mixing up rows and columns in your post???

range("A" & rows.Count).End(xlUp).row + 1

will get you the row number of the first empty cell in
Column "A", after the last cell (in Column "A") with
an entry in it.

Post back with more info on what you're trying to do.

John

"JasonSelf " wrote in message
...
Believe it or not, I am actually trying to write this VBA for my mother.
She does attendance forms for her school each week and after she is
done has to write some formulas in...unfortunately she is less adept at
excell formulas and usage than I am with VBA. So here is what I am
trying to accomplish.

1. I need to some how have excell figure out what the last used row in
column A is, skip a column and then write in a formula....I can write
in the forumla just not the other stuff.

2. On that same row I need it to verify what is in row 2 of any given
column and based on that value return a forumla to that cell.

This is probably easy for most of you but I am just learning so bear
with me.

Thanks,
Jason Self


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Some VBA questions about cell selection

Jason,

1. The cell in question can be referenced with

Range("A" &
Cells(Rows.Count,"A").End(xlUp).Row+1).Offset(0,1) .FormulaR1C1 = etc.

2. To validate a cell of (I assume you mean) column 2

I suggest you set an object variab le to your current cell, such as

set thisCell = Range("A" &
Cells(Rows.Count,"A").End(xlUp).Row+1).Offset(0,1)
If Cells(thisCell.Row,2) = "abc" Then 'as an example
thisCell.FormulaR1C1 = "=RC2& "" is the answer"""
Endif

This simply tests the value in column 2, and if it is 'abc' returns the
text in the current cell.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"JasonSelf " wrote in message
...
Believe it or not, I am actually trying to write this VBA for my mother.
She does attendance forms for her school each week and after she is
done has to write some formulas in...unfortunately she is less adept at
excell formulas and usage than I am with VBA. So here is what I am
trying to accomplish.

1. I need to some how have excell figure out what the last used row in
column A is, skip a column and then write in a formula....I can write
in the forumla just not the other stuff.

2. On that same row I need it to verify what is in row 2 of any given
column and based on that value return a forumla to that cell.

This is probably easy for most of you but I am just learning so bear
with me.

Thanks,
Jason Self


---
Message posted from http://www.ExcelForum.com/



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
Answers to questions posing more questions in a workbook sbelle1 Excel Worksheet Functions 2 August 8th 09 01:02 AM
Limiting selection in a cell AND linking that selection to a list Lisa Excel Discussion (Misc queries) 1 July 28th 09 05:00 PM
View Questions and Answer to questions I created Roibn Taylor Excel Discussion (Misc queries) 4 July 24th 08 12:05 AM
Copy Selection - Transpose Selection - Delete Selection Uninvisible Excel Discussion (Misc queries) 2 October 23rd 07 04:18 PM
limit cell list selection based on the selection of another list lorraine Excel Worksheet Functions 2 December 14th 04 08:17 PM


All times are GMT +1. The time now is 12:52 PM.

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

About Us

"It's about Microsoft Excel"