Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Answers to questions posing more questions in a workbook | Excel Worksheet Functions | |||
Limiting selection in a cell AND linking that selection to a list | Excel Discussion (Misc queries) | |||
View Questions and Answer to questions I created | Excel Discussion (Misc queries) | |||
Copy Selection - Transpose Selection - Delete Selection | Excel Discussion (Misc queries) | |||
limit cell list selection based on the selection of another list | Excel Worksheet Functions |