Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default Global Report only need USA Data . . .

Hello,

We are moving to global reports and they produce data for areas all over the
world. For US clients who do not want to see data outside of the USA I have
to manually delete data for UK, France, Dublin, China, Tokyo etc. and I was
wondering if there was a macro I could run to remove all of the rows with a
location outside of the USA while still leaving the USA data element of the
report in tact.

Any insight is appreciated!

Rachel


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,101
Default Global Report only need USA Data . . .

Sub deleterows()
Dim rngColumnA As Range
Const sUSA As String = "USA"
Dim i As Long
'Change rngColumnA to the Column that has USA
Set rngColumnA = _
ActiveSheet.Range(Cells(1, "A"), Cells(Rows.Count, "A").End(xlUp))
'Work backwards from bottom to top when deleting rows
Application.ScreenUpdating = False
With rngColumnA
For i = .Rows.Count To 1 Step -1
If .Cells(i) < sUSA Then
.Cells(i).EntireRow.Delete
End If
Next i
End With
Application.ScreenUpdating = True
End Sub

"Rachel Costanza" wrote:

Hello,

We are moving to global reports and they produce data for areas all over the
world. For US clients who do not want to see data outside of the USA I have
to manually delete data for UK, France, Dublin, China, Tokyo etc. and I was
wondering if there was a macro I could run to remove all of the rows with a
location outside of the USA while still leaving the USA data element of the
report in tact.

Any insight is appreciated!

Rachel


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,344
Default Global Report only need USA Data . . .

Hi,

Suppose you have a column called Country. Select the data and choose Data,
Filter, AutoFilter, open the filter dropdown in the Country columns top cell
and choose Custom, from the first drop down pick not equal to and on the top
right box enter United States or whatever you use to designate US customers.

When you click OK all non US will be displayed, select all the visible data
and press delete. Choose Data, Filter and uncheck AutoFilter. Only the US
is left.

If this helps, please click the Yes button.
--
Thanks,
Shane Devenshire


"Rachel Costanza" wrote:

Hello,

We are moving to global reports and they produce data for areas all over the
world. For US clients who do not want to see data outside of the USA I have
to manually delete data for UK, France, Dublin, China, Tokyo etc. and I was
wondering if there was a macro I could run to remove all of the rows with a
location outside of the USA while still leaving the USA data element of the
report in tact.

Any insight is appreciated!

Rachel


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting missing data from one report into another report... vlookupabyss Excel Discussion (Misc queries) 3 January 8th 08 03:26 PM
Displaying Global position data raisun Excel Discussion (Misc queries) 1 November 1st 07 04:36 PM
Automate Excel report to place certain data into existing report? Craig Harrison Excel Worksheet Functions 3 July 25th 06 01:54 PM
How to cause a pivot tables to not summarize data - just report the data Greybeard Excel Discussion (Misc queries) 0 July 27th 05 10:21 PM
=(IF(ISTEXT('Data Report'!$L2:$L4),'Data Report'!N3,J11)) Response s2frost Excel Discussion (Misc queries) 2 June 25th 05 06:07 PM


All times are GMT +1. The time now is 02:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"