Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 2
Default Trying to calculate next sequential number using multiple columns

Starting in Cell AI8, calculate the next sequential number using the last number from Column B. But only calculate for Cell AI8 if AG8 = "1'.

In the screenshot attached, Cells AI8 and AI9 should remain blank. AI10 should be 1261. AI11 should be 1262. AI12 should remain blank because AG12 is blank. The next sequential number should be 1263 in AI18.
Attached Images
 
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 160
Default Trying to calculate next sequential number using multiple columns

Can't see your screenshot - resolution too low...

Are you looking for a VBA solution or a worksheet formula?

You should take a look at the =MAX() worksheet function, something like:

=IF ( AG8 < 1 ; "" ; MAX ( AI$8 : AI8 ) + 1 )

....that's the worksheet formula, I would make, and then copy down as long as
needed.

It should be fairly easy to convert this to VBA, if you want to :-)


CE



"copastor" wrote in message
...

Starting in Cell AI8, calculate the next sequential number using th
last number from Column B. But only calculate for Cell AI8 if AG8
"1'.

In the screenshot attached, Cells AI8 and AI9 should remain blank. AI1
should be 1261. AI11 should be 1262. AI12 should remain blank becaus
AG12 is blank. The next sequential number should be 1263 in AI18

+-------------------------------------------------------------------
|Filename: Screenshot 2014-04-25 15.05.21.jpg
|Download: http://www.excelbanter.com/attachmen...tachmentid=971
+-------------------------------------------------------------------


--
copastor




---
Denne e-mail er fri for virus og malware fordi avast! Antivirus beskyttelse er aktiveret.
http://www.avast.com

  #3   Report Post  
Junior Member
 
Posts: 2
Default

Thank you for your response! I am looking for a worksheet formula as I am VBA challenged! I tried this formula and it didn't work. I'm not sure what else to do to explain what I am trying to achieve.







Quote:
Originally Posted by copastor View Post
Starting in Cell AI8, calculate the next sequential number using the last number from Column B. But only calculate for Cell AI8 if AG8 = "1'.

In the screenshot attached, Cells AI8 and AI9 should remain blank. AI10 should be 1261. AI11 should be 1262. AI12 should remain blank because AG12 is blank. The next sequential number should be 1263 in AI18.
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
Calculate the number of Columns apart Brad Excel Programming 2 April 29th 09 07:57 PM
Fill Right Variable Number of Columns, then Calculate Using Offset ryguy7272 Excel Programming 6 October 25th 07 06:16 PM
calculate average from multiple columns and put results in a new s turen Excel Programming 3 September 8th 07 02:26 AM
Formula help, calculate dates and name in multiple columns TomB KY Excel Discussion (Misc queries) 1 November 8th 06 09:15 PM
Calculate sequential value for future date SueDot Excel Worksheet Functions 2 December 22nd 04 05:15 PM


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

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"