easy one

MERKY

New Member
Joined
Apr 29, 2002
Messages
38
this formula is part of a larger formula:

Range("D5:D" & x).Select

How can i replace the "5" to, x/2 add 1 using Visual Basic language
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
On 2002-05-02 04:43, MERKY wrote:
this formula is part of a larger formula:

Range("D5:D" & x).Select

How can i replace the "5" to, x/2 add 1 using Visual Basic language
If I understand your question:

x = 5
y = Int(x / 2) + 1
Range("D" & y, "D" & x).Select

Eli
 
Upvote 0
On 2002-05-02 04:43, MERKY wrote:
this formula is part of a larger formula:

Range("D5:D" & x).Select

How can i replace the "5" to, x/2 add 1 using Visual Basic language

If I undertand you correctly ?? then
Range("D" & (x2)+1 & ":D" & x).Select
 
Upvote 0

Forum statistics

Threads
1,214,945
Messages
6,122,393
Members
449,081
Latest member
JAMES KECULAH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top