Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
VBA Question
07-21-2014, 04:28 PM
Post: #1
VBA Question
Need help with VBA Question
Find all posts by this user
Quote this message in a reply
08-26-2014, 12:34 AM
Post: #2
RE: VBA Question
Need to know how i can access my company's database to import data to my excel for analysis
Find all posts by this user
Quote this message in a reply
09-27-2014, 01:18 AM
Post: #3
RE: DUPLICATEROWS loop
How to rezolve this ?




Sub DUPLICATEROWS()
' Compare 2 rows in 2 sheets
Workbooks(2).Activate
Range("BB1:CZ2").Cut


Workbooks(3).Activate

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''​'''''''''''''''''''''''''''''''''''''

Sheets(2).Select

If Range("A1") = "" Then
Rows("1:2").Select
ActiveSheet.Paste
ActiveWorkbook.Save
ActiveWorkbook.Close
ActiveSheet.Copy After:=Sheets(Sheets.Count) '
End If
GoTo 45
Sheets(1).Select
Rows("1:2").Select
ActiveSheet.Paste

1 lastRowA = Sheets(1).Cells(Rows.Count, "A").End(xlUp).Row
lastRowB = Sheets(2).Cells(Rows.Count, "A").End(xlUp).Row
'For x = 0 To 10000
For i = 0 To 55 ' BC
For J = 0 To 55
For x = 0 To 5000 ' THIS IS THE PROBLEM

' HOW to go to the next row and than next and next until the last not empty row
' to compare with the row from Sheet (1)
' HOW to Loop through each row in Sheet(2) ????????

'Check Name
If Sheets(2).Cells(x + 1, i + 1).Value = Sheets(1).Cells(1, J + 1).Value Then
' Sheets(1).Cells(6, i + 1).Interior.ColorIndex = 3
Sheets(1).Cells(6, i + 1) = "a"
End If
Next J
Next i
If Range("A20") = 55 Then ' HERE DUPLICATE END SUB
Application.DisplayAlerts = False
ActiveWorkbook.Close
End If


'Range("A1:BC2").Interior.ColorIndex = 3
' If Range("A20") = 55 Then Range("A1:BC2").Clear
If Range("A20") <> 55 Then ' HERE NO DUPLICATE
''' HOW to Loop through each row in Sheet(2) ????????
' GO SHEET (2) NEXT ROW TO CHECK

'If Sheets(2).Cells(x + 1) = "" Then Next x
Next x
Rows("1:2").Select

Selection.Cut
Sheets(2).Select
Columns("A:A").Select
Selection.Find(What:="", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Select

' Rows("6:6").Select
ActiveSheet.Paste

' Sheets(1).Range("A" & Rows.Count).End(xlUp).Copy Destination:=Sheets(2).ActiveRange
'Range("A" & Rows.Count).End(xlUp).Offset(1).Select


' Sheets(1).Rows("1:2").Copy Destination:=Sheets(2).ActiveRange


'Next
Application.DisplayAlerts = False
ActiveWorkbook.Save
ActiveWorkbook.Close
ActiveSheet.Copy After:=Sheets(Sheets.Count) '
End If

''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''​'''''''''''''''''''''''''''''''''''''

'Workbooks(3).Save
'Workbooks(3).Close
45 Range("AU836:AU6243").ClearContents
Range("AY6126") = Range("AY6126") + 1

End Sub

Thank you.
Regards
Find all posts by this user
Quote this message in a reply
10-22-2014, 03:25 PM (This post was last modified: 10-22-2014 03:29 PM by bijay.)
Post: #4
RE: VBA Question
Hello sir/Madam,
I have one question regarding the excel that i have this kind of format
5 3 2 1 sum(5+3+2+1) =11
4 1 1 1 sum(4+1+1+1)=7
when i put a cursor in formula bar then it shows formula ...but i wana do like that
when i enter in formula bar the formula shouldnot be shown but i can edit paste can do everything in formula bar ....is it possible for me
If u dont understand my question then you can mail me in this mail address .
simply i wana say that i have to hide formula which is possible by protecting sheet but i wana change that formula in any type like i can simply write a value there.is it poosible

sir i wana pop out some messages when i open the excel file and then enable the macro.
when i click on enable this macro then a message like hi will be pop out automatically ..i dont need to run the macro .....
how can we do this


Regards,
Bijay Sharma
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)