Poor Export Formatting Leads To Complicated Macro
Jun 12, 2008
I'm going to attach a file I'm working with so you can see my issue direction but here is the background:
- file you see is an excel export from another software. This is as clean as it gets.
- what I am trying to accomplish is take the data for each person listed and movie it to it's own sheet via a macro. Creating the sheet name based on the name of the person. I've completed that task before with some help here, but never with data formatted like this.
- does anyone have any options they can think of? I've tried working with the two cells that make up the page number and basicly the move off that but can't seem to get that to work.
- would anyone suggest any formatting changes (while keeping all data integrity) before trying a move?
View 9 Replies
ADVERTISEMENT
Apr 22, 2014
I have what I think is a pretty complicated issue. At my job, we have a running and constantly changing list of jobs that we have to work on throughout the day. The job management system is really unwieldy and it’s often hard to tell what exactly we have to do today and what can wait until tomorrow. So a few times a day, I export the list to an excel doc, which I’m trying to set up with conditional formatting to highlight as green the stuff for today, ghost back what can wait, and leave white and blank the cells that don’t have any info in them. I but the attachment system wasn't working for me, so I can't provide the example I've been working on.
So far, I’ve managed to set up a formula in the conditional formatting that takes into account column C, but I need to take into account information in columns B, C, and D to determine if the job line should be highlighted or dimmed. Column B is the job's title and it is just text, column C is the Begin date, and column D is the due date. here’s what I need the conditional formatting to do.
If the begin date in column C is Today at 9:00am or earlier, and the due date in column D is today, I need to highlight the column. I managed to figure out the first part of this formula, but don’t know how to keep the line from hilighting if the due date is tomorrow: =$C2<=TODAY()+TIME(9,0,0)
The second part is that I need to hilight jobs that begin and are due today (have today’s date in columns C and D), regardless of what time they have if the task title in column B starts with “Rework Request from PS” or “Rework Request from QA"
Ideally, I’d like to change the text color to something nearly white to sort of hide the jobs that don’t need to be done today, and I figured that part out based on the formula I did manage: =$C2>=TODAY()+TIME(9,0,1)
apply this to the whole sheet so I can paste the report into it a few times a day without having to rewrite the formulas in a new sheet every time, and the number of items does change throughout the day. However when I do, the empty cells turn green as if they’re due today, and I can’t figure out how make them stay blank.
View 5 Replies
View Related
Aug 20, 2007
I'm in the process of decoding a mass amount of data that will be incoming shortly. The data will be formatted as shown below. What I would like to do is have a macro that between two full seconds (for example 10:11:48:0 to 10:11:49:0) would find the mode of the RSSI values, paste that with a time value that is in the general excel format. (I.E. 10:11:48 = 0.42484). When all is said and done, what I have access to should look like the second string of posted data. I can get the time cleaned up on my own, but I'm having trouble with the loop macro that will find which cells to use for the mode.
View 12 Replies
View Related
Feb 15, 2014
In column B I have a list of blank cells and cells that contain values. I want a macro to search for 'Jobs' and if it finds this word in column B then delete the entire row where it is find and also delete the row below it if column B is blank and also delete the row below again if column B is blank (up to 8 rows below where the word is find at most will be blank)
When it eventually finds a cell that is not blank, then exit sub.
View 5 Replies
View Related
Jul 28, 2009
here i have results from a race. the racers have numbers in the format of a20,c51 etc
then the name of the competitor and car make model.
then some times that they run. in the format of 11.80 secs the following times have either thousands or hundredthousths of a second which i only want to comma seperate the 2 decimals before and after so a 12.3456 will be ,12.34,ignoring the 56 then the next result and so on.
so i want to comma seperate the a20,andrewspeck,vauxhalltigra,11.27,13.36,12.87,12.91 etc etc
now the name and vehicle will cause huge sorting head ache so leave those together i can seperate them manually.
.
A7,Andrew Speck,Vauxhall Tigra,11.27,13.36116,12.87113,12.91124,12.14134,11.37129,11.27128
2A4Iain BurtVauxhall Astra11.8012.1011311.8811411.8211511.80120
A2Chris SuttonVauxhall Corsa11.9514.1911413.8811212.4612412.1511511.9511814.08112
A17Andy NichollsRover 200 Turbo12.0812.0811612.8211712.50119
1A4Iain BurtVauxhall Astra12.0812.0811212.5812312.4611612.5311712.2910512.18111
A4Iain BurtVauxhall Astra12.1313.5811512.6111712.1811012.4811512.1311112.29113
1A8Gareth BirchVauxhall Nova12.1412.1411612.769912.18119
A8Gareth BirchVauxhall Nova12.1912.9811412.3811012.4111513.009612.4611212.19114
1A7Andrew SpeckVauxhall Tigra12.2612.26131
A10Errol HuellHonda CRX Turbo12.3613.3211513.2912315.726912.3610822.3652
1A14Westan FrickerFiat Coupe Turbo12.7812.78110
A14Westan FrickerFiat Coupe Turbo12.8414.8411513.7411413.4011513.3011513.0511312.84109
View 9 Replies
View Related
Jul 6, 2006
I would like to write a function that enhances conditional formatting capabilities in this way: suppose that cell(4,5) contains a number that can be 0 to 5
in the adiacent cell(4,6) i want to put a function that:
1) write "NO DATA", "HIGH", "GOOD", "MODERATE", "POOR", "BAD" depending on that value
2)Choose color font depending on value
3)Choose color background depending on value
I wrote this piece of
Public Function StatusResponse(AdiacentCell As Range) As String
Dim thisStatus As String
Dim ThisFontColor As Integer
Dim ThisbkColor As Integer
Select Case AdiacentCell.Cells(1, 1)
Case Is = 0
ThisbkColor = 2
ThisFontColor = 1
StatusResponse = "NO DATA"............
View 2 Replies
View Related
Apr 23, 2008
I got a complicated macro that I need some help on. I want to write a macro that does the following (for clarity, I have attached an excel file).
I want to write a macro that automatically copies the rows in worksheet 'boekhouding' to their corresponding worksheet. The name of the worksheet, to which the data of each row has to be copied, is specified in row I (Beware: if it is not in row I, it is in row H). The names of all destination worksheets are given in the blue cells in worksheet rekeningen.
For example, row 2 (of worksheet 'boekhouding') should be copied to worksheet 'ABD'. Row 3 (of worksheet 'boekhouding') sheet be copied to sheet 'bestuur'. Row 4 (of worksheet 'boekhouding') should be copied to sheet 'Commissiekosten gala'. Etc for every datapoint (row) in worksheet 'boekhouding'. The number of datapoints will exceed 300, so manually doing this will be too time-consuming and unreliable.
View 14 Replies
View Related
Apr 15, 2006
The data is a column of zipcodes, a column of timezones for each zipcode, along with a column of this past years sales leads, showing a count of the number of leads from each zipcode. I want to assign territories to 10 sales agents based on an equal division of the number of leads in each time zone; that is, based on last years leads each agent would be assigned zipcodes in each time zone so that all agents would end up with the same number of leads in each time zone.
View 3 Replies
View Related
Oct 29, 2008
I am having an issue with this formula. The formula works for 85% of my data. I worked through the formula and found that the error occurs within the networksday part of the formula. For some reason the it gives me a 0 when it should be giving me a 1. This causes the solution to be a negative and create the error. I placed an example of when both the formula works and doesnt work. I tried many things. Love to get some other ideas why this is happening. Its a altered Daddylongleg formula....
View 6 Replies
View Related
Aug 24, 2006
why it takes about 100 times longer to set a value using a named range. The code below demonstrates the huge difference between Range("A1") and Range("my_range")
Public Sub testloop()
Dim counter As Long
Dim start As Double
start = Timer()
Application.Calculation = xlCalculationManual
Application. ScreenUpdating = False
For counter = 1 To 34000
Range("my_range") = 9999 ' 101 seconds
'Range("A1") = 9999 ' 1.2 seconds
Next counter
View 7 Replies
View Related
Aug 23, 2006
Im having slow performance reading a CSV file into 34000 sheet named ranges. Currently it takes about 8 minutes to read 34,000 records. After stepping through the code Ive realized there are two bottle necks.
1)finding which sheet that the range name resides see getRangeAddress() and
2) actually setting the value to the named range i.e. Range(ra) = dprecord(1)
The CSV file looks like this: <range name>,<data value>
e.g. DPA_1001,99090
Performanace actually seem to slow as the macro runs.
Public Sub readDatapoints()
'Macro readDataPoints
'This macro will read in the a comma seperated value (CSV) file of datapoints.
Dim sFile As String
Dim currentLine As String
Dim delimit As String
Dim counter As Integer
Dim ra As String
Dim fs As Object
Dim ts As Object
Dim dprecord
Dim oldStatusBar As Boolean
delimit = ","
View 9 Replies
View Related
Jul 20, 2006
In creating a chart that calculates home prices I need to be able to just enter "Good", "Fixer", "Remodeled", etc...and have that automatically use one of the numbers that I have set and add it to my total. I have created a box with variables for "Good", "Fixer", "Remodeled", etc...How do I make it so I can put any of those variables into the condition of the house row and make it add the dollar amount specified into the totals box? This is the very simple code that I am using to find the totals so far: =SUM(C5:J5)
Here's what I need:
Also, the plug in values in the first picture WILL CHANGE and I don't want to have to change the formula. So I need something to point to those cells.
View 4 Replies
View Related
Jan 27, 2010
Macro to export and import a module and assigning different macro automatically ...
View 9 Replies
View Related
Aug 14, 2014
I am new to macros and I am trying to export 20 charts that are one worksheet. I found the code below online and it it does work for a majority of the charts. However, it randomly skips some of the charts and does not export the. I receive an Run Time error 76; Path not found. Each chart is named.
Sub Create_Png()
Dim objCht As ChartObject
Dim strPath As String
strPath = "C:Path Name"
For Each objCht In ActiveSheet.ChartObjects
objCht.Chart.Export strPath & objCht.Name & ".png", FilterName:="png"
Next
End Su
View 1 Replies
View Related
Jul 24, 2012
I have a sheet on a workbook called "Upload"
I would like to set up a macro to export this sheet as a CSV file to a directory called "temp" I have values in Col A:F and the maximum number of rows that will be used is 500
View 2 Replies
View Related
Sep 7, 2012
I have an excel with some ISBN10 in column1 what I would like to do is add a form control button that would do the following. Say for example column A has the following
1
ISBN10
2
1616550414
3
1926778456
4
1926778324
5
192677843X
The button should make a .txt file on Desktop/amazon file that should be like that Starting from A2
[URL] ........
ISBN may be 1 or more. 4 ISBN rows is just an example so the code should understand where the column rows cells finish. Also B column, C column etc has other values so it should only export column A.
View 2 Replies
View Related
Jan 22, 2007
Does anyone have a code to export al the codefiles at once from another workbook or in the same workbook
View 2 Replies
View Related
Jun 19, 2014
My Cell Range is ("J3:L28") and I want it to export to a txt file with the File name from Cell (M2) to C:Test. Macro to make a push button for this?
View 3 Replies
View Related
Jan 25, 2007
I will admit I am a neophyte when it comes to VBA - I am JUST opening the book (never had to program before). I am trying to figure out how to create a VBA macro that will, with the click of the button, save the data in my worksheet (minus the header line) into a CSV file.
I can export the data I have into a CSV file the normal way, but I DONT want the header line included. And instead of manually removing it each time, Id like to just be able to export it, then send it to the DBA for integration.
View 3 Replies
View Related
Jun 21, 2007
know the code to export a file to data base?
View 6 Replies
View Related
Sep 27, 2012
exporting outlook calendar to excel using a macro?
View 2 Replies
View Related
Jun 19, 2014
My Cell Range is ("K3:L28") and I want it to export to a txt file with the File name from Cell (M2).
View 9 Replies
View Related
Apr 3, 2008
I have some dates that I want to reformat. The file is an ascii text file, and I have imported this into excel. There are 7 and 8 character lengths
3122007
10122007
I want the dates to be all 8 characters (with a zero in front of the 7 character dates), and also I want to reverse the format, so it will read 20071203
I have a number of methods but nothing has worked yet.
After this I plan to export the file as a comma separated ascii txt file. I managed to import it, but I'm not sure how to export it.
View 9 Replies
View Related
Apr 8, 2009
I have a spreadsheet that currently looks like ........
My problem is that I want the macro to create either (a) a seperate text file for each line (1 for line 2, one for line 3 etc etc) or even better (b) create a file for the specific line i am on. For example if i happended to click on D5 and then pressed the macro key it would onyl create a txt file for line 5, same if i clicked on E6, it would only create a file for line 6.
I would be grateful if you could highlight the code you insert into my macro as it may be useful for other reports i run.
View 9 Replies
View Related
Jul 31, 2009
I manually copy a variable number of rows from an Excel worksheet and then paste/append them into an Access table.
I would like to have a macro for this to automate the process a bit, and I can always add the code to a button or menu item later.
Data setupRange starts at A11:X11
Number of rows to copy will vary depending on the data within the sheet
View 9 Replies
View Related
Jan 25, 2014
I've created a worksheet that allows my team to build an order for a customer. I've created a PDF form with blanks so they can fill in the necessary values in the correct fields ie. Tariff Name, Handset Name, Minutes etc.
I'm hoping to create a macro button that will export all the the data needed and auto fill the PDF form to save time.
So far I've added a button with the following code
VB:
Sub CopyData()
Sheets("Quote").Range("v16:ab16").Copy
Sheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).PasteSpecial Paste:=xlPasteValues
End Sub
This simply adds all the data needed onto a separate sheet ready to be exported as a csv.
I'm in need of the rest of the code to export/import Sheet1 into my fillable form.
So far attempts to export to .csv have turned my entire worksheet into a .csv file or caused errors within the code.
I've attached a sample of my Workbook and PDF form below.
Sample Documents .....
View 9 Replies
View Related
May 12, 2014
I have a macro that I run repeatedly in a certain type of spreadsheet that does an export on a selection, pulls up a "Save As" message box and saves as a text file. There are 9 sheets in the workbook that contain the same data analysis for a set of samples, the only difference between them being the number of data (e.g. some may have 1500, 1400, 1600, etc.). I only select three columns of data to export (I6:K????) that contain counts (1,2,3,....), x-coordinates and y-coordinates. The counts column (I) uses a formula that only counts if there is an x-coordinate next to it (Col J).
[Code].....
Generally, what I do to make quick work out of selecting the variable ranges is to select Sheets 03-11 (the first nine sheets) and select K6:I6 (starting w/ K6). Then, on each individual sheet, I do CTRL+SHIFT+DOWN to select all the relevant data (if I started my selection with I6, then it would select all cells that contained formulas which may or may not have x,y-coordinates adjacent to them). Once the data is selected (I6:K????), I run the export macro and save the data as text. I would like a macro that can automate the selection for each Sheet 03-11, excluding Sheets "all", "data" and "summary", and run the export macro, first prompting me for a file location and a file prefix. When the text file is saved, it uses the file prefix and Worksheet name to build the filename, i.e. "pathprefix_wkshtname".
I've attached an example workbook : 20120511_Au-cit_pH5_test.xlsx
View 7 Replies
View Related
Nov 18, 2011
I have an excel spreadsheet laid out as:
A B C D E F G H I J K L M N O
1 ** ** *** ** ** ** ** *** ** *** ** ** *** ** **
2 ** ** *** ** ** ** ** *** ** *** ** ** *** ** **
3 ** ** *** ** ** ** ** *** ** *** ** ** *** ** **
4 ** ** *** ** ** ** ** *** ** *** ** ** *** ** **
5 ** ** *** ** ** ** ** *** ** *** ** ** *** ** **
I need a macro that can automatically export the cell data for each row from Column A--> O into it's own seperate text file, and name each text file with the text in column A. So again... everything in row 1 from A to O would be copied and pasted into a text file called (A1 cell data).txt
once that first text file has created, I was hoping that there could be a loop to automatically close the first text file and move on to row 2 and do the same, copy all text in row 2 from A to O into a new text file titled (A2 cell data).txt, close and move on to row 3 etc etc.
this is a large list of approximately 8,000 records.
View 1 Replies
View Related
Apr 14, 2014
I've been using a VBA code to look through my spreadsheet and find any graphs in any tab and move it to powerpoint. I have about 70 tabs with 7 graphs each.
I have is that the order of the graphs in the slidepack isn't in the same as found on each excel tab.I also tried renaming them (chart1-chart7) but problem still remains.
View 3 Replies
View Related
May 29, 2007
I'm currently using the formula in cell I43:
=AVERAGE(IF(I10:I420,I10:I42,""))
If any of these cells are blank I get the #DIV/0! error. If any are filled in then I get an average which is what I want. The problem is that I am trying to average mutiple sheets of these cells (I43) and if any sheet has this has the #div! error it won't calculate.
View 9 Replies
View Related