Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default figuring out the next number in a series

i want to search a column for the largest number...but the numbers have an E
before them....

E05001
E05002
E05003
..
..
..
E05xxx

is it possible to find the largest one, then add one to it and give me back
that number? when the new year comes, the series will look like this:

E06001
E06002
..
..
..
E06xxx

Thanks for any input on this
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default figuring out the next number in a series

With the 'number' of interest in E5 use the formula
="E"&TEXT(RIGHT(E5,LEN(E5)-1)+1,"00000")

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
i want to search a column for the largest number...but the numbers have an E
before them....

E05001
E05002
E05003
.
.
.
E05xxx

is it possible to find the largest one, then add one to it and give me back
that number? when the new year comes, the series will look like this:

E06001
E06002
.
.
.
E06xxx

Thanks for any input on this

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 139
Default figuring out the next number in a series

steve:

if A1=Caption,A2=E05001,A3=E05002.....

you cat get largest one for Array Function

{=MAX(VALUE(RIGHT(A2:A17,5)))}

VBA Code

'''''''''''''''''''''''''''''''''''''''''''
Sub AddItem()
Dim r As String, rmax As String
r = Range("A65536").End(xlUp).Row
rmax = Application.Evaluate("MAX(VALUE(RIGHT(A2:A" & r & ",5)))")
Cells(r + 1, 1) = "E" & Format(rmax + 1, "00000")
End Sub

'''''''''''''''''''''''''''''''''''''''''''''

File DownLond:
http://vba.holyou.net/file/9412221.xls

--
天行健,君*以自強不息
地勢坤,君*以厚德載物

http://www.vba.com.tw/plog/


"steve" wrote:

i want to search a column for the largest number...but the numbers have an E
before them....

E05001
E05002
E05003
.
.
.
E05xxx

is it possible to find the largest one, then add one to it and give me back
that number? when the new year comes, the series will look like this:

E06001
E06002
.
.
.
E06xxx

Thanks for any input on this

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
User Selectable Series and Number of Series for Line Chart Dave in NJ Charts and Charting in Excel 2 February 23rd 09 12:18 AM
Figuring number of Mon. Tues. Wed between dates Paula Excel Worksheet Functions 12 October 30th 08 07:26 PM
Having trouble with number series Cuzman Excel Discussion (Misc queries) 5 July 16th 06 01:23 AM
How do I change a social security number to a number series? LCDawn Excel Discussion (Misc queries) 4 December 22nd 05 04:15 PM
how to get number series in excel 1 2 3 4 etc Demain Excel Worksheet Functions 2 August 2nd 05 01:18 PM


All times are GMT +1. The time now is 03:17 PM.

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

About Us

"It's about Microsoft Excel"