Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
jburch
 
Posts: n/a
Default add one to cell below

I am trying to create an inventory sheet -

Column A - Part Number (always the same) (ex. 10-0A in cell 2A)
Column B - Serial Number (needs to add 1 every new cell (ex. 0001 in cell B2
and needs to be 0002 in cell B3))
Column C - Invoice Description
Column D - Product Details

Is it possible to only add a new line when you start typing 10-0A in cell A3
and have the serial number column B add 1 to be 0002 in that column?

PART NUMBER SERIAL NUMBER INVOICE DESCRIPTION
10-0A 0001

If i click the cell below 10-0A and start typing is it possible to
automatically in the cell under the 0001 in the serial number column to add
+1 to make it 0002?

Thanks,



  #2   Report Post  
Posted to microsoft.public.excel.misc
Mark Lincoln
 
Posts: n/a
Default add one to cell below

I would do this:

Format your column B cells as "0000" in order to see leading zeros.

in B3, type in the following formula:

=IF(A3<"",B2+1,"")

Copy this formula down Column B as far as you need to.

  #3   Report Post  
Posted to microsoft.public.excel.misc
jburch
 
Posts: n/a
Default add one to cell below

Thank you very much!

jburch

"Mark Lincoln" wrote:

I would do this:

Format your column B cells as "0000" in order to see leading zeros.

in B3, type in the following formula:

=IF(A3<"",B2+1,"")

Copy this formula down Column B as far as you need to.


  #4   Report Post  
Posted to microsoft.public.excel.misc
jburch
 
Posts: n/a
Default add one to cell below

Is there a way for when i print this if only 4 products are on the page to
automatically hit print and not have extra pages print?

"Mark Lincoln" wrote:

I would do this:

Format your column B cells as "0000" in order to see leading zeros.

in B3, type in the following formula:

=IF(A3<"",B2+1,"")

Copy this formula down Column B as far as you need to.


  #5   Report Post  
Posted to microsoft.public.excel.misc
Mark Lincoln
 
Posts: n/a
Default add one to cell below

I've amended this a bit from one of my own macros. Some of the experts
on this list might have a more elegant solution. But having said
that....

This assumes no empty rows in the data range.

Dim c as Range
Dim LastRow as Integer
Dim PrintRange as String

Sub PrintDataUnits()
For Each c In Range("A2:A5000").Cells
If (c.Value) = "" Then
LastRow = LTrim(Str(c.Row - 1))
Exit For
End If
Next
PrintRange = "A1:F" & LastRow ' <---Change F to match your last
column
If LastRow < "1" Then Range(PrintRange).PrintOut
End Sub

Hope this helps.

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
Instead of a negative number, I'd like to show zero... Dr. Darrell Excel Worksheet Functions 6 December 7th 05 08:21 PM
Cell color based upon cell value My View Excel Discussion (Misc queries) 11 July 6th 05 03:59 AM
cell color index comparison MINAL ZUNKE New Users to Excel 1 June 30th 05 07:11 AM
Function syntax to compare cell contents ES Excel Worksheet Functions 2 May 18th 05 03:53 PM
VLookup resulting in a blank cell... KempensBoerke Excel Worksheet Functions 1 October 28th 04 09:57 PM


All times are GMT +1. The time now is 06:36 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"