ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Union/Range/Cells (https://www.excelbanter.com/excel-programming/325128-union-range-cells.html)

KentÄ[_3_]

Union/Range/Cells
 
Hi guys

Do you have any idea why this code don't runs?

Set mittRange = Application.Union(Range(Cells(orgRad, KolE), Cells(dblRad,
KolI)))
--
Hälsningar/Regards
KentÄ

keepITcool

Union/Range/Cells
 
yes..
look at your brackets..

you attempt to create a union with 1 range only.







--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


KentÄ wrote :

Hi guys

Do you have any idea why this code don't runs?

Set mittRange = Application.Union(Range(Cells(orgRad, KolE),
Cells(dblRad, KolI)))


Bob Phillips[_6_]

Union/Range/Cells
 
The Union method requires at least 2 arguments, you are only passing one.

Range(Cells(orgRad, KolE), Cells(dblRad,KolI)) is a range of contiguious
cells starting at Cells(orgRad, KolE), and ending atCells(dblRad,KolI), it
is not two ranges.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"KentÄ" .(donotSpam) wrote in message
...
Hi guys

Do you have any idea why this code don't runs?

Set mittRange = Application.Union(Range(Cells(orgRad, KolE), Cells(dblRad,
KolI)))
--
Hälsningar/Regards
KentÄ





All times are GMT +1. The time now is 05:40 PM.

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