ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   specifying range based on input (https://www.excelbanter.com/excel-programming/314830-specifying-range-based-input.html)

Papa Jonah

specifying range based on input
 
In my continuing effort to figure out how to specify FY ranges in a
spreadsheet, I have made some progress. However, what I have come to is an
input statement to specify which date shall be used as a starting point for
the range.

My problem now, is that I need to be able to take the input (mybegdate) and
get the code to select the cell corresponding to mybegdate so the
currentregion can then be identified.

Thanks.

keepITcool

specifying range based on input
 

Excel has a inputbox method for that.
(it's different from vba's standard inputbox method,
so be sure to precede with application...

See VBA help.. but for a range you need Type:=8


dim rng as range
set rng = application.inputbox("Select the date",Type:=8)

keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"?B?UGFwYSBKb25haA==?="
wrote:

In my continuing effort to figure out how to specify FY ranges in a
spreadsheet, I have made some progress. However, what I have come to
is an input statement to specify which date shall be used as a
starting point for the range.

My problem now, is that I need to be able to take the input
(mybegdate) and get the code to select the cell corresponding to
mybegdate so the currentregion can then be identified.

Thanks.



Papa Jonah

specifying range based on input
 
I have an input that works.
What I have is a bunch of dates in column A. I need Excel to select the
cell in column A that corresponds to the input date.

"keepITcool" wrote:


Excel has a inputbox method for that.
(it's different from vba's standard inputbox method,
so be sure to precede with application...

See VBA help.. but for a range you need Type:=8


dim rng as range
set rng = application.inputbox("Select the date",Type:=8)

keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"?B?UGFwYSBKb25haA==?="
wrote:

In my continuing effort to figure out how to specify FY ranges in a
spreadsheet, I have made some progress. However, what I have come to
is an input statement to specify which date shall be used as a
starting point for the range.

My problem now, is that I need to be able to take the input
(mybegdate) and get the code to select the cell corresponding to
mybegdate so the currentregion can then be identified.

Thanks.




keepITcool

specifying range based on input
 
just google.or read some posts in this NG.
a fair amount of all questions here are related to that subject.


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"?B?UGFwYSBKb25haA==?="
wrote:

I have an input that works.
What I have is a bunch of dates in column A. I need Excel to select the
cell in column A that corresponds to the input date.

"keepITcool" wrote:



All times are GMT +1. The time now is 04:22 AM.

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