Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
Let consider the table below: A B 8 9 10 R216 11 R217 12 R218 13 R220 250 R368 500 1000 I need two formulas at cell A8 and B8 respectively to pick up the first and last refrence in column A. The number of rows may differs from time to time upon pasting of data to this column. Thanks Low -- A36B58K641 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
"Mr. Low" wrote in message
... Hi, Let consider the table below: A B 8 9 10 R216 11 R217 12 R218 13 R220 250 R368 500 1000 I need two formulas at cell A8 and B8 respectively to pick up the first and last refrence in column A. As long as there are no gaps in the column you could write a macro and either assign it to a button that has to be pressed or write it for the sheet and execute every time there is a change to any cell in column A: Sub Macro1() Range("A9").Select Selection.End(xlDown).Select Selection.Copy Range("A8").Select ActiveSheet.Paste Selection.End(xlDown).Select Selection.End(xlDown).Select Application.CutCopyMode = False Selection.Copy Range("B8").Select ActiveSheet.Paste End Sub This assumes that the starting point is below cell A9 but not known. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
If the data is text as it appears to be in your sample:
For the first item: =INDEX(A10:A1000,MATCH("*",A10:A1000,0)) For the last item: =LOOKUP("zzzzzzzzzz",A10:A1000) Or: =LOOKUP(REPT("z",255),A10:A1000) -- Biff Microsoft Excel MVP "Mr. Low" wrote in message ... Hi, Let consider the table below: A B 8 9 10 R216 11 R217 12 R218 13 R220 250 R368 500 1000 I need two formulas at cell A8 and B8 respectively to pick up the first and last refrence in column A. The number of rows may differs from time to time upon pasting of data to this column. Thanks Low -- A36B58K641 |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Valko,
Thanks for your formulas. All works well. Best Regards Low -- A36B58K641 "T. Valko" wrote: If the data is text as it appears to be in your sample: For the first item: =INDEX(A10:A1000,MATCH("*",A10:A1000,0)) For the last item: =LOOKUP("zzzzzzzzzz",A10:A1000) Or: =LOOKUP(REPT("z",255),A10:A1000) -- Biff Microsoft Excel MVP "Mr. Low" wrote in message ... Hi, Let consider the table below: A B 8 9 10 R216 11 R217 12 R218 13 R220 250 R368 500 1000 I need two formulas at cell A8 and B8 respectively to pick up the first and last refrence in column A. The number of rows may differs from time to time upon pasting of data to this column. Thanks Low -- A36B58K641 |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You're welcome. Thanks for the feedback!
-- Biff Microsoft Excel MVP "Mr. Low" wrote in message ... Hi Valko, Thanks for your formulas. All works well. Best Regards Low -- A36B58K641 "T. Valko" wrote: If the data is text as it appears to be in your sample: For the first item: =INDEX(A10:A1000,MATCH("*",A10:A1000,0)) For the last item: =LOOKUP("zzzzzzzzzz",A10:A1000) Or: =LOOKUP(REPT("z",255),A10:A1000) -- Biff Microsoft Excel MVP "Mr. Low" wrote in message ... Hi, Let consider the table below: A B 8 9 10 R216 11 R217 12 R218 13 R220 250 R368 500 1000 I need two formulas at cell A8 and B8 respectively to pick up the first and last refrence in column A. The number of rows may differs from time to time upon pasting of data to this column. Thanks Low -- A36B58K641 |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
The following returns the last non-blank cell =LOOKUP(1,1/(A:A<""),A:A) You already have the best method for finding the first nonblank cell. If this helps, please click the Yes button cheers, Shane Devenshire "Mr. Low" wrote: Hi, Let consider the table below: A B 8 9 10 R216 11 R217 12 R218 13 R220 250 R368 500 1000 I need two formulas at cell A8 and B8 respectively to pick up the first and last refrence in column A. The number of rows may differs from time to time upon pasting of data to this column. Thanks Low -- A36B58K641 |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
=LOOKUP(1,1/(A:A<""),A:A)
You can't use the entire column in the array in versions of Excel prior to Excel 2007. =LOOKUP(1,1/(A1:A65535<""),A:A) -- Biff Microsoft Excel MVP "Shane Devenshire" wrote in message ... Hi, The following returns the last non-blank cell =LOOKUP(1,1/(A:A<""),A:A) You already have the best method for finding the first nonblank cell. If this helps, please click the Yes button cheers, Shane Devenshire "Mr. Low" wrote: Hi, Let consider the table below: A B 8 9 10 R216 11 R217 12 R218 13 R220 250 R368 500 1000 I need two formulas at cell A8 and B8 respectively to pick up the first and last refrence in column A. The number of rows may differs from time to time upon pasting of data to this column. Thanks Low -- A36B58K641 |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Shane,
Thanks for the formula. I tested it, however it was not working in Excel 2002 as T. Valko said. I have modified the formula to =LOOKUP(1,1/(A1:A65535<""),A1:A65535 ) and it works. Thank you anyway for sharing with me. Kind Regards Low -- A36B58K641 "Shane Devenshire" wrote: Hi, The following returns the last non-blank cell =LOOKUP(1,1/(A:A<""),A:A) You already have the best method for finding the first nonblank cell. If this helps, please click the Yes button cheers, Shane Devenshire "Mr. Low" wrote: Hi, Let consider the table below: A B 8 9 10 R216 11 R217 12 R218 13 R220 250 R368 500 1000 I need two formulas at cell A8 and B8 respectively to pick up the first and last refrence in column A. The number of rows may differs from time to time upon pasting of data to this column. Thanks Low -- A36B58K641 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2002 : How to remove the digits from original reference ? | Excel Discussion (Misc queries) | |||
Excel 2002: Can Vlookup formula search for data with two reference | Excel Discussion (Misc queries) | |||
Can you reference a cell that is sorted in excel 2002? | Excel Worksheet Functions | |||
Excel 2002 column limit (IV = 256) | Excel Discussion (Misc queries) | |||
restoring column labels Excel 2002 | Excel Discussion (Misc queries) |