Hi All,
Please check the attached workbook at this link.
http://speedy.sh/mYzPk/SampleTest.xlsx
It contains how the data existed in different sheets which i need to summarize in a separate sheet.
I have prepared the data structure how i required manually in the sheet "FinalResult" for...
Luke,
You are right.Because my sheet names(some part) are with Jan to Dec.That is why i have explained like that in my post.
But the code what i have received from you really helps to me.
I have a macro i need to call that from the current month to the all the previous months.
This is a...
Luke,
Of course.I can solve my problem by using your code.
But how i want is a loop which show the values from the current month(n) to the previous month(1).
ex:if month=july then
i need to get the values like from july to jan
month=july
month=june
month=may
month=april
month=March...
Hi Luke,
Thanks for the reply.
In my workbook,I have sheets like from Jan '12,Feb '12,.....Dec '12.
Now I need to find the current month and load the current month corresponding sheet data.Likewise all the previous months from the current month.
Regards
Kumar
Hi All,
I am able to find out the current month and previous month by using this code and it is fine.
Dim CurrMonth, PrevMonth, ws As Worksheet, x
CurrMonth = Format$(Date, "mmm")
PrevMonth = Format$(Date - Day(Date), "mmm")
For Each ws In Sheets
If ws.Name Like CurrMonth...
Hi All,
i am able to insert the values from excel sheet columns data to the corresponding columns of an sql table.
But the problem is
in my execl sheet i have some date columns.In those some rows are having data(date) and some rows are empty.
Now when i am sending these data to a...
Hi SirJB7,
Thanks for the help.
yes the lack of commas is the problem.
here is the correct code.
sSQL = "UPDATE TblLabParams " & _
"set [Month] = '" & SplitMonth & "' , [Year] = '" & SplitYear & "' , [Protocol] = '" & ColA &...
Hi,
if the workbook sheet names are like this "Jan '12"....."Jun '12","Jul '12"..etc
I am using this code to find out the current month and previous month sheets in my workbook
sub test()
Dim CurrMonth As String, PrevMonth As String
CurrMonth = Format$(Date, "mmm 'yy")
PrevMonth...
HI,
This is the query i am using to update the records.
But when i am executing,getting sql syntax error.
Please correct the syntax of the query.
sSQL = "UPDATE TblTest " & _
"set [Month] = '" & SplitMonth & "' , [Year] = '" & SplitYear & "' ...
Hi All,
I want to catch the ID comming from the sqlTable like this but i am not succeeded
~
ColA = shtSheetToWork.Cells(lRow, 1)
ColB = shtSheetToWork.Cells(lRow, 2)
SplitMonth="Jun"
SplitYear="2012"
SQLSelect = "select ID from Test where Country= ' " & ColA & " ' and Name=' " & ColB &...
Hi All,
I am having an excel workbook with some sheets.From that i am able to read the current month and previous month sheets data and inserting those columns data into sql table.
But to avoid insertion of same data all the time,
I just want to check a condition like if particular columns...
Hi All,
Is it possible to access the same workbook and made changes(Like passing the cell values from other workbook) for multiple users of the same network simultaneously.
Here is the problem.
I have 2 workbooks say "first.xlsm" and "second.xlsx".
from the "first.xlsm", i am passing the...
Hi SirJB7,
These are the download links of my sample files
[Code]
http://speedy.sh/J5zvY/PollReport-DataCharts.xlsm
http://speedy.sh/2xuna/PollReport-Quest.xlsm
[Code]
After downloading,Please change the folderpath in the code
Ex:
[F:PollReport-DataCharts.xlsm]
PollReport-Quest.xlsm...
Hi Sajan,
Assume i have two files.
from one file,i can able to open another file and vice versa.
Here in first file, i will give the second file name and in the second file,i will give the first file name.
In this case i will take 3 copies from the first file.With any of these files,i can...
Hi All,
I have several source workbooks and only one target workbook.
I can redirect to target from any of the source.
Now the problem is,
How can i go back to the same source from the target.(target opened from which source dynamically control from target).
Hope you understand the...
Hi All,
How can i do like this.
I am opening second workbook from the first workbook at that time how can i save and close the first workbook.
So, that one workbook should open at a time.
This is how i tried but not succeeded.
Application.Workbooks.Open ("E:Second_Data.xlsx")...