Excel/Data into Form


I made one form in a worksheet that is to be used repeatedly.  The only thing changing is specific customer info posting to the same field for every iteration.  I use a separate spreadsheet within the same workbook to input data into the form.  I associate fields between the two worksheets using a simple "equal" function (and as I found out, this is an incorrect use of the "equal" function).  After entering info onto row one, all the info populates correctly in the form.  But after this, I need the form to update based on data entered in row 2.  Then after row 2, I need it to update as I enter information in row 3.  How can I program to accomplish this?

Several ways to accomplish this.  One way is to use the COUNTA() function to determine which row should be used each time on your DATA sheet.

For instance, if Row1 is the titles and the data starts on row2, then this formula would tell you which row has the last row with data, assuming there are no blank cells amongst your growing database in column A:


Now, you can use that answer to bring back a value from the appropriate row by using that result in an INDEX() formula.   So, to get the last value from column A on the Data sheet, in your first formm field you could try this:

=INDEX(Data!A:A, COUNTA(Data!$A:$A))

In the next form field, let's say you wanted the value from column C of the Data sheet, but from the same row that was determined in the first form field:

=INDEX(Data!C:C, COUNTA(Data!$A:$A))

Notice we "INDEX" the column we want a value from, then the second parameter (the COUNTA) tells us which value from that column to bring back, and we're using column A for the COUNTA each time so the answer will always be the same at any given one moment.  
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts


Jerry Beaucaire


Excel Formulas, macros, automation. Microsoft Excel MVP - 2010. Code site with free code snippets and techniques: http://sites.madrocketscientist.com/jerrybeaucaires-excelassistant/files


Microsoft Excel MVP - 2010. I have my own extensive Excel help/code site: http://sites.madrocketscientist.com/jerrybeaucaires-excelassistant/files ===================== I have been offering free assistance as an Excel aid on many web sites for many years: (http://www.excelforum.com - JBeaucaire) ======== (http://www.askmehelpdesk.com/spreadsheets - JBeaucaire) ======= (http://www.mrexcel.com/forum - jbeaucaire)

Bachelor's Degree from Azusa Pacific University in Mathematics and Music Composition

Awards and Honors
Microsoft Excel MVP 2010

©2016 About.com. All rights reserved.