[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Macor isn't picking up all the cloumns

Posted on 2012-04-09
3
Medium Priority
?
170 Views
Last Modified: 2012-06-27
I added the column labled PAYPAL to the sheet called "DATABASE, now when I run my daily macro in the sheet called "DAILY SUMMARY" I am getting a debug message or not all the info is coming over.  This sheet should pick up all activity from the databse sheet for the day entered in the upper left.  Currently is doesn't seem to be getting the data entered into the EFT column
experts2.xls
0
Comment
Question by:wcody
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 2000 total points
ID: 37823917
See if this works

Sub Button1_Click()
    Application.ScreenUpdating = False
 
    Dim rng As Range, cell As Range, x As String
    Dim ws As Worksheet, ws1 As Worksheet
    Set ws = Sheets("Daily Summary")
    Set ws1 = Sheets("Database")
    x = ws.Range("B1")
    If ws.Cells(4, 1).Value <> "" Then ws.Range("A4:G" & ws.Cells(ws.Rows.Count, "A").End(xlUp).Row).ClearContents
    If x <> "" Then
        Set rng = ws1.Range("k6:k" & ws1.Cells(ws.Rows.Count, "k").End(xlUp).Row)
        For Each cell In rng
            If DateValue(cell.Value) = DateValue(x) Then
                ws1.Range("A" & cell.Row & ":I" & cell.Row).Copy ws.Range("A" & ws.Cells(ws.Rows.Count, "a").End(xlUp).Row + 1)
            End If
        Next cell
    End If
    Cells.Select
    Selection.EntireColumn.AutoFit
    Range("a1").Select
    MsgBox "Done"
 
 
    Application.ScreenUpdating = True
 
End Sub

Open in new window

0
 

Author Comment

by:wcody
ID: 37827260
I don't know how to put this into the sheet
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 37827313
Does this mean that you are successful?
0

Featured Post

Tech or Treat! - Giveaway

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question