LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming,comp.apps.spreadsheets
external usenet poster
 
Posts: 1
Default Copying block (range of cells) based on a value of a specific cell-VBA

Hi. I am new to VBA. - as part of a custom function, I need to copy a
block of cells from one spreadsheet to another, based on the value in
the first column. For example, if cell A1 = '1', then copy A2:A10 to
new spreadsheet. What is the best way to do that?

Also, the user selects a range, which would be the input to my
function. How can I get the number of rows and columns in that range
and how can I refer to individual cells from there? For example, my
range is XY:ZH - I need to find out how many rows and columns are
there.. and also how do I get to the cell that is, for example, 5 rows
down, 2 columns right in my range? - something like X+2, Y+5 - how do
I convert that to a cell address?

Thank you very much..
 
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
Sum only specific cells based on value in adjacent cell KKD Excel Discussion (Misc queries) 4 May 28th 09 04:18 PM
Block cell if specific condition exists WildWill Excel Discussion (Misc queries) 8 March 16th 09 05:50 AM
Copying a block of cells so that it updates automatically Kiersten L Excel Worksheet Functions 2 October 7th 08 01:28 AM
display a range of editible cells based on specific in another cel Miki Excel Discussion (Misc queries) 0 October 10th 07 04:17 PM
how to color code a row of cells based on a specific cell value Parker1333 New Users to Excel 1 February 2nd 05 08:01 AM


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