Need formula

  • Thread starter Thread starter Tracey
  • Start date Start date
T

Tracey

Hi, I am doing a shipping form. If a user enters text in the total cost
field, the Item # field should automatically show 1 (for the first line
item). But if they need to use row 2 for an additional description of
the item in row 1, and then they enter the 2nd item in row 3, I need
that to show a 2 in the Item # field indicating that it's the 2nd line
item. The way this will know is that if there's nothing entered in the
Cost field, it's obviously not it's own line item. Hope I've made my
question clear.
Anyone know how this can be done?
Thank you,
Tracey
 
If your item number is in column A, and Total Cost is in column B, with
headings in row 1, enter the following formula in cell A2:

=IF(B2="","",MAX(A$1:A1)+1)

and copy down to the last row of data

Another (better?) option would be to keep the entire description in one
row. You can start a new line in a cell by typing Alt+Enter. This would
make it easier to sort or summarize the data.
 
There may be a better way but I think this is fairly
simple.
If the Item# is column A, the Description is Column C and
the Cost is Column D
And assuming the Item will start on row 5.
In B5 enter =IF(D5>0,1,"") and copy down to the end of the
form.
In Cell A5 enter =IF(D5>0,B5,"")
In Cell A6 enter =IF(D6>0,SUM($B$5:B6),"")
Auto fill from A6 to the end of the form.
Select Column B and format column as hidden.

Should work.
Charlie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top