Solved

Excel Macro copy Cell range not empty between worksheets

Posted on 2014-09-17
6
369 Views
Last Modified: 2014-09-17
hi

i like to copy all values in cells are filled from Cell E2 down in worksheet PROCESS to Worksheet EXPORT from Cell  N2 down. All cells are "not filled" has a #NV with formula because of missing data. All cells are filled has a value like
an email-adress "test@domain.com"

i've found an example but it copying if the cells are colored.

Option Explicit
Function CountByColor(CellColor As Range, SumRange As Range)
Dim myCell As Range
Dim iCol As Integer
Dim myTotal
iCol = CellColor.Interior.ColorIndex
For Each myCell In SumRange
If myCell.Interior.ColorIndex = iCol Then
  myTotal = myTotal + 1
End If
Next myCell
CountByColor = myTotal
End Function

Open in new window


Thanks in advance for your help
0
Comment
Question by:Mandy_
[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
  • 3
  • 3
6 Comments
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40327453
Don't know what your question is. Maybe if you post the spreadsheet, it might help.
0
 
LVL 2

Author Comment

by:Mandy_
ID: 40327466
Hi phillip

2 pictures. hope that helps. It should be a macro not a formula.

source
copy only cells with values to other worksheet called export N2 down

destination
0
 
LVL 24

Expert Comment

by:Phillip Burton
ID: 40327468
I still have no idea what your question is - maybe you can rephrase.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Author Comment

by:Mandy_
ID: 40327476
How could i code this in VBA macro?  if cell in sheet1 has a value (see picture) copy to sheet2 column N2 downstairs.
If sheet1 not have a value (0 or #NV) not copy it. Thats it!
0
 
LVL 24

Accepted Solution

by:
Phillip Burton earned 500 total points
ID: 40327480
Sub CopyItems()
On Error Resume Next
For introw = 2 To 9999
    Select Case Sheets("Process").Cells(introw, 14)
    Case 0, "", "#NV"
    Case Else
        Sheets("Export").Cells(introw, 14) = Sheets("Process").Cells(introw, 14)
    End Select
Next
End Sub
0
 
LVL 2

Author Closing Comment

by:Mandy_
ID: 40327487
Thats it! Thank you so much.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

733 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