ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Insert range of cells with a (UDF) function (https://www.excelbanter.com/excel-programming/390270-insert-range-cells-udf-function.html)

firsttimer

Insert range of cells with a (UDF) function
 
Hi,

I have several ranges defined( range1=$1:$15, range2=$16:$20, range3=$20:$30)

Depending on a cell value I want to insert one of tese ranges.
e.g.
InsRange("range"&A1)

Is should be possible with a VBA function, but I dont have any VBA experience




NickHK

Insert range of cells with a (UDF) function
 
You cannot achieve this with a UDF, as they can only (with a few exceptions)
return a value to a cell.

What do you mean by "Depending on a cell value I want to insert one of tese
ranges" ?

NickHK

"firsttimer" wrote in message
...
Hi,

I have several ranges defined( range1=$1:$15, range2=$16:$20,

range3=$20:$30)

Depending on a cell value I want to insert one of tese ranges.
e.g.
InsRange("range"&A1)

Is should be possible with a VBA function, but I dont have any VBA

experience






Bob Phillips

Insert range of cells with a (UDF) function
 
See response in worksheetfunctions.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"firsttimer" wrote in message
...
Hi,

I have several ranges defined( range1=$1:$15, range2=$16:$20,
range3=$20:$30)

Depending on a cell value I want to insert one of tese ranges.
e.g.
InsRange("range"&A1)

Is should be possible with a VBA function, but I dont have any VBA
experience







All times are GMT +1. The time now is 12:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com