ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Column Count shortcut (https://www.excelbanter.com/excel-worksheet-functions/122274-column-count-shortcut.html)

stickandrock

Column Count shortcut
 
Is there a way to show the number of columns between 2 columns. Without
using a Column() formula in both then a formula to determine the difference.

We are constantly using Vlookup at work and end up manually counting columns
for the desired retreved column.

Thanks for any and all input.



stickandrock

Column Count shortcut
 
I guess I could do a =COLUMNS(B:AH) to get 33, but there is some form of
hotkeys that would be nice to know.

"stickandrock" wrote:

Is there a way to show the number of columns between 2 columns. Without
using a Column() formula in both then a formula to determine the difference.

We are constantly using Vlookup at work and end up manually counting columns
for the desired retreved column.

Thanks for any and all input.



Elkar

Column Count shortcut
 
You can insert a cell reference into the COLUMN() function. So...

=COLUMN(Z1)-COLUMN()

....would give you the number of columns between Z and the current column.

Does that help?

HTH,
Elkar



"stickandrock" wrote:

Is there a way to show the number of columns between 2 columns. Without
using a Column() formula in both then a formula to determine the difference.

We are constantly using Vlookup at work and end up manually counting columns
for the desired retreved column.

Thanks for any and all input.



T. Valko

Column Count shortcut
 
Try something like this:

=COLUMNS($A:A)

$A:A = 1
$A:B = 2
$A:E = 5
$A:J = 10

=VLOOKUP($A1,$B$1:$Z$10,COLUMNS($A:B),0)

As you drag copy across the COLUMNS( ) will increment.

Biff

"stickandrock" wrote in message
...
Is there a way to show the number of columns between 2 columns. Without
using a Column() formula in both then a formula to determine the
difference.

We are constantly using Vlookup at work and end up manually counting
columns
for the desired retreved column.

Thanks for any and all input.





stickandrock

Column Count shortcut
 
Thanks....

All of those will work.

I just thought there may be some combination of hotkeys to calculate it.

For example, if I have the starting column selected then do something like a
cntl-shift and move to the ending column a value may be displayed as to the
number of columns between the 2 marks. Maybe I'm asking for excel to do too
much, but thought it would be a useful set of keys if you do a lot of lookups
like I do.

Thanks for everyones input.

"T. Valko" wrote:

Try something like this:

=COLUMNS($A:A)

$A:A = 1
$A:B = 2
$A:E = 5
$A:J = 10

=VLOOKUP($A1,$B$1:$Z$10,COLUMNS($A:B),0)

As you drag copy across the COLUMNS( ) will increment.

Biff

"stickandrock" wrote in message
...
Is there a way to show the number of columns between 2 columns. Without
using a Column() formula in both then a formula to determine the
difference.

We are constantly using Vlookup at work and end up manually counting
columns
for the desired retreved column.

Thanks for any and all input.






T. Valko

Column Count shortcut
 
About the only thing I can think of that will do something like that is if
you select a range, say, A1:E1 and while you still have the left mouse
button depressed, if you look in the name box you'll see the size of the
selected range:

1R x 5C

Biff

"stickandrock" wrote in message
...
Thanks....

All of those will work.

I just thought there may be some combination of hotkeys to calculate it.

For example, if I have the starting column selected then do something like
a
cntl-shift and move to the ending column a value may be displayed as to
the
number of columns between the 2 marks. Maybe I'm asking for excel to do
too
much, but thought it would be a useful set of keys if you do a lot of
lookups
like I do.

Thanks for everyones input.

"T. Valko" wrote:

Try something like this:

=COLUMNS($A:A)

$A:A = 1
$A:B = 2
$A:E = 5
$A:J = 10

=VLOOKUP($A1,$B$1:$Z$10,COLUMNS($A:B),0)

As you drag copy across the COLUMNS( ) will increment.

Biff

"stickandrock" wrote in message
...
Is there a way to show the number of columns between 2 columns.
Without
using a Column() formula in both then a formula to determine the
difference.

We are constantly using Vlookup at work and end up manually counting
columns
for the desired retreved column.

Thanks for any and all input.








stickandrock

Column Count shortcut
 
Biff-

Thanks.... Some days it's hard to see the forest through the trees.

That will work.


Thanks again,

Don

"T. Valko" wrote:

About the only thing I can think of that will do something like that is if
you select a range, say, A1:E1 and while you still have the left mouse
button depressed, if you look in the name box you'll see the size of the
selected range:

1R x 5C

Biff

"stickandrock" wrote in message
...
Thanks....

All of those will work.

I just thought there may be some combination of hotkeys to calculate it.

For example, if I have the starting column selected then do something like
a
cntl-shift and move to the ending column a value may be displayed as to
the
number of columns between the 2 marks. Maybe I'm asking for excel to do
too
much, but thought it would be a useful set of keys if you do a lot of
lookups
like I do.

Thanks for everyones input.

"T. Valko" wrote:

Try something like this:

=COLUMNS($A:A)

$A:A = 1
$A:B = 2
$A:E = 5
$A:J = 10

=VLOOKUP($A1,$B$1:$Z$10,COLUMNS($A:B),0)

As you drag copy across the COLUMNS( ) will increment.

Biff

"stickandrock" wrote in message
...
Is there a way to show the number of columns between 2 columns.
Without
using a Column() formula in both then a formula to determine the
difference.

We are constantly using Vlookup at work and end up manually counting
columns
for the desired retreved column.

Thanks for any and all input.










All times are GMT +1. The time now is 05:24 AM.

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