I have a web form with data that is emailed to me. I want to set this up in a database (free) or Excel preferably. How can I do it easily? If I paste it into Excel it just fills the first column and I want it to go across as cells in one row as I have 500 of these.
Data looks like this and I have compleeted and empty firelds but they all are completed and emailed to me -
Paste the fields into a text file, arranging them with each field seperated by commas or tabs and one line of text per message. Save it as .csv file, then import it into Excel. Bob's your mum's brother.
-- is from my AVG scan and I get these on every email but someone else should be receiving these emails so it is best that it is something else and in the form. IMSS WMS Membership is a drop down choice and I can make it the last field of the record. I could also strip out and have no field names sent back to me but if anyone needs to pick this up and understand it it is much easier with these.
With IMSS WMS Membership as an end of record marker try this:
Sub fmt() Dim InSht As Worksheet, Outsht As Worksheet Dim LastRow, iRow, jRow, jCol Application.ScreenUpdating = False Set InSht = ActiveSheet LastRow = InSht.Cells(Rows.Count, 1).End(xlUp).Row Sheets.Add after:=InSht Set Outsht = ActiveSheet jRow = 1 jCol = 2 For iRow = 1 To LastRow Application.StatusBar = Int(100 * iRow / LastRow) & "% done..." If InSht.Cells(iRow, 1).Value <> "" Then Outsht.Cells(jRow, jCol).Value = Trim(InSht.Cells(iRow, 1).Value) If Left(InSht.Cells(iRow, 1).Value, 4) = "IMSS" Then jRow = jRow + 1 jCol = 2 Else jCol = jCol + 1 End If End If End If Next iRow Application.StatusBar = False Application.ScreenUpdating = True End Sub
Open your worksheet and press ALT _ F11 to open the Visual Basic Editor. Insert > Module then paste in the above code. X to close the VBE. On the 'unformatted' sheet Tools > Macro > Macros, Click on fmt and click the Run button.