VBA practise

Let’s see what will happen with our data if we decide to declare some values and make a loop for it as a module to insert.

Open Excel.

Write some values from 1 to 18 with more then 3 numbers after comma, left second column blank, and write some words in the 3rd column

imagine, that this values are kind of data genereted form the report with no headers.

now insert a new row above the values, to get the report similar to this one below:

   
1234,23456 abscksksksa
1233,45679 abscksksksa
1232,679016 abscksksksa
1231,90124 abscksksksa
1231,123471 abscksksksa
1230,34570 abscksksksa
1229,567927 abscksksksa
1228,79015 abscksksksa
1228,012382 abscksksksa
1227,23461 abscksksksa
1226,456838 abscksksksa
1225,67907 abscksksksa
1224,901293 abscksksksa
1224,12352 abscksksksa
1223,345749 abscksksksa
1222,56798 abscksksksa
1221,790204 abscksksksa
1221,01243 abscksksksa

Now insert module named:

ShortReminder

a result

ShortReminderresult

as you can see only values till 11 has been changed, regrding to the condition set into loop. There is one little mistake in a code, will someone guess what is it? VBA is flexible as much, that we cannot see this error from user side.

Now I am going to do same things but with the real data from my project.

If you have already practised data export from MS SQL into Excel or Access, please use table Logins.xls or .xlsx and save as .xlsm

and add a column as follow

Employye_Since
01.12.2003
02.03.2015
01.10.2016
01.07.2008
02.12.2017
01.10.2015
01.01.2014
01.05.2010

insert module:

Sub EnterMoreDetails

by clicking on a bottom : ENTER DATA

Enter_Data

after enter the formulas:

formula.jpg

a complete result

EnterDataResult.jpg

or we can make it looks more approachable

enter more details