Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
FGM FGM is offline
external usenet poster
 
Posts: 35
Default More question on Column Number

Is there a way to get the Beginning and Ending Column number (not count)
from a range when using the RefEdit on a form? I know you could put two
RefEdit's on the form and ask for the beginning and then the ending but users
might frown on having to do that... I would.

Thanks all help is most appreciated... someday I will have much knowledge.

The following was my question before followed by the answer.
Excel 2003 Windows 2000

I want to use the RefEdit control on a form and I want to be able to get the
column number from the cell range the person selects. Just the Column number.

For example if it returns Sheet!$B$3 I want to get the number 2 for the
second column. I can do this in a excel cell directly by using =COLUMN(D7)
I get the number 4.

What I am doing is in a large group of data: Insert a blank row after a
given number of rows or a phrase changes and then averaging all the data in
the given rows above the blank. I presently do this two ways by first having
the user input the first group of averages and then copy that group. Also,
another method I have used is having them insert the column number manually
example 5 for E etc. However, I think it would be best to use the RefEdit
and so they would have that option as sometimes the form is openned and they
can not remember the column and have to close it to scroll the worksheet.

A lot of information you might not need but I like to hear what people are
trying to do.

Thanks for any help you can give..




Was this post helpful to you?
Reply Top





Tom Ogilvy 10/20/2005 11:38 AM PST





set rng = Range(Refedit1.Text)
msgbox rng.column

--
Regards,
Tom Ogilvy

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default More question on Column Number

You can get an offset column like



--

HTH

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


"FGM" wrote in message
...
Is there a way to get the Beginning and Ending Column number (not count)
from a range when using the RefEdit on a form? I know you could put two
RefEdit's on the form and ask for the beginning and then the ending but

users
might frown on having to do that... I would.

Thanks all help is most appreciated... someday I will have much

knowledge.

The following was my question before followed by the answer.
Excel 2003 Windows 2000

I want to use the RefEdit control on a form and I want to be able to get

the
column number from the cell range the person selects. Just the Column

number.

For example if it returns Sheet!$B$3 I want to get the number 2 for the
second column. I can do this in a excel cell directly by using =COLUMN(D7)
I get the number 4.

What I am doing is in a large group of data: Insert a blank row after a
given number of rows or a phrase changes and then averaging all the data

in
the given rows above the blank. I presently do this two ways by first

having
the user input the first group of averages and then copy that group. Also,
another method I have used is having them insert the column number

manually
example 5 for E etc. However, I think it would be best to use the RefEdit
and so they would have that option as sometimes the form is openned and

they
can not remember the column and have to close it to scroll the worksheet.

A lot of information you might not need but I like to hear what people are
trying to do.

Thanks for any help you can give..




Was this post helpful to you?
Reply Top





Tom Ogilvy 10/20/2005 11:38 AM PST





set rng = Range(Refedit1.Text)
msgbox rng.column

--
Regards,
Tom Ogilvy



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default More question on Column Number

You can get an offset column like

Range("B3").Columns(2).Column

which gives 3

The first and last column number of a range like

Range("B3").Column

Range("E7:M19")(Range("E7:M19").Count).column

--

HTH

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


"FGM" wrote in message
...
Is there a way to get the Beginning and Ending Column number (not count)
from a range when using the RefEdit on a form? I know you could put two
RefEdit's on the form and ask for the beginning and then the ending but

users
might frown on having to do that... I would.

Thanks all help is most appreciated... someday I will have much

knowledge.

The following was my question before followed by the answer.
Excel 2003 Windows 2000

I want to use the RefEdit control on a form and I want to be able to get

the
column number from the cell range the person selects. Just the Column

number.

For example if it returns Sheet!$B$3 I want to get the number 2 for the
second column. I can do this in a excel cell directly by using =COLUMN(D7)
I get the number 4.

What I am doing is in a large group of data: Insert a blank row after a
given number of rows or a phrase changes and then averaging all the data

in
the given rows above the blank. I presently do this two ways by first

having
the user input the first group of averages and then copy that group. Also,
another method I have used is having them insert the column number

manually
example 5 for E etc. However, I think it would be best to use the RefEdit
and so they would have that option as sometimes the form is openned and

they
can not remember the column and have to close it to scroll the worksheet.

A lot of information you might not need but I like to hear what people are
trying to do.

Thanks for any help you can give..




Was this post helpful to you?
Reply Top





Tom Ogilvy 10/20/2005 11:38 AM PST





set rng = Range(Refedit1.Text)
msgbox rng.column

--
Regards,
Tom Ogilvy



Reply
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
Newbie question - column letter displayed instead of number dredwin Excel Worksheet Functions 1 January 14th 10 10:05 PM
inverse of the column function? i.e. input a number, output thecorresponding column text label Brotherharry Excel Worksheet Functions 19 February 14th 09 12:37 AM
Count number of cells and total in one column, based on another column suffix Pierre Excel Worksheet Functions 5 October 31st 07 12:28 AM
Display missing Part Number if Column A does not match column B Erik T Excel Worksheet Functions 2 April 17th 06 11:23 PM
Auto number w/ different letter-number combos in same column Colleen B Excel Worksheet Functions 2 February 23rd 05 02:41 PM


All times are GMT +1. The time now is 11:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"