Checking For Blank Cell When Reformatting
Sep 29, 2006
I want to reformat some data, arranged as follows, and ignore blank cells
Date1 Time1 blank Time2
Date2 blank Time3
to
Date1 Time2
Date1 Time2
Date2 Time3
Code being used, currently writes out lines where a Date exists, but Time cell is blank, what do I need to modify in the code below, to ensure blank times are not written out
Sub test()
counter = 2
For i = 1 To Range("A65536").End(xlUp).Row
For j = 2 To Cells(i, 256).End(xlToLeft).Column
Sheets("Sheet2").Cells(counter, 1).Value = Cells(i, 1).Value
Sheets("Sheet2").Cells(counter, 2).Value = Cells(i, j).Value
counter = counter + 1
Next j
Next i
End Sub
View 3 Replies
ADVERTISEMENT
Dec 18, 2009
I want to create a nested IF formula that checks for blanks in three cells.
If A1=Not blank, then enter in "Live"
else
If B1=Not blank, then enter "Signed"
else
If C1=Not blank, then enter "Interested"
else
enter blank into cell
View 2 Replies
View Related
Feb 9, 2007
I have the following macro:-
ActiveSheet.Select
ActiveSheet.Copy
Columns("A:D").EntireColumn.AutoFit
Range("A2:B500").Select
Selection.Sort Key1:=Range("B2:B500"), order1:=xlAscending, Key2:=Range("A6:A250"), order2:=xlAscending
Within this I would like to add a couple of features which check:-
1) If there is a number in column A - there should be one in column B
2) The numbers in column B are sequential i.e. 1, 2, 3 etc without any gaps in the sequence
View 9 Replies
View Related
Apr 26, 2007
I created a macro to save my spreadsheet into another book, but I first want to check if cells Z2 & Z3 are blank, and if Z4 = "$--k". If any of those conditions are true, I want a messagebox sent to the user to please fill in data in those cells, and exiting the sub( ) preventing the save from happening. The messagebox would say "Blank Info", vbOKonly button, Title would be "Fill in data".
View 2 Replies
View Related
Mar 17, 2009
I am rewriting functions for my companies inventory spreadsheets. Excel for some reason took the item codes and formatted them into date format. Right now it is in 10/01/1902 format, and it needs to be in 10-1902 format. I've tried reformatting the cells but so far I haven't found one that works.
View 5 Replies
View Related
Apr 21, 2007
I have a few hundred addresses in excel in the following format
NameAddress1Address2Address3AreaCityPin
Is it possible for me to change that into
Namee
Address1
Address2
Address3
Area
City-Pin
View 10 Replies
View Related
Apr 6, 2009
I have some data which is exported into excel by a package I can't amend. The information comes into excel in the format
00:00:04 (representing hh:mm:ss) but if I look at the formatting of the cell it says the formatting is general. I want to be able to cut and paste this into another spreadsheet and then apply conditional formatting to colour the text if the value is above 00:00:09, but try as I might, I can't! When I cut and paste (even using paste special) it still retains its previous format, and I still can't amend it
Any suggestions?
View 6 Replies
View Related
Apr 16, 2008
I have several non-consistent/non-sequential columns with supposed dates formatted as:
09.04.08 (day/month/year). I'd like a macro where a popup window will allow me to type in columns to execute on (ie. a,g,m,t) & then it will go through & change the dates to REAL date format 04/09/2008 (month/day/year).
If this easy enuf that any of you gurus could write a few lines?
View 9 Replies
View Related
Dec 22, 2008
I need to translate my Source Data into a new format as follows: ...
View 9 Replies
View Related
Apr 30, 2007
I have a global dataset where column A represents longitude, B represents latitude, C is a spinup value which can be ignored (even deleted) and columns D to DH are runoff values for the years 1901 to 2002. The rows extend down to 6510 (including the column headers, 6509 without). I've been trying to create a reformatted table based on this data, where longitude values are listed along row 1 and latitude values are listed in column A, with the corresponding runoff values for each year correctly repositioned into the spreadsheet according to this new 'format'; there will be 102 grids created (one for each year). The longitude values are currently not ordered and will need to be sorted (low to high) into position along row 1, without causing the runoff data to become unassigned to its associated longitude and latitude coordinates.
The second part is to then perform a linear interpolation of the reformatted data for each year's table so that the data is again reformatted' from 1.5-degrees to a 5-minute spatial resolution. This involves creating tables for each runoff year as before, but this time creating new values via application of a linear interpolation between each adjacent pair of existing values (in both the x and y direction - as the data are to be imagined as being on a geographical grid with coordinates). I've currently been trying to achieve this using Fortran, but have been getting nowhere as I'm completely new to this programming language, so I thought I'd try using Excel as I'm more familiar with this, although not sufficiently so to solve this alone!
View 7 Replies
View Related
May 27, 2014
I have a matrix that looks like this:
1
2
3
4
5
6
7
8
9
10
11
12
And would like to rearrange this data to:
1
2
3
4
5
6
7
8
9
10
11
12
In actuality it's a 110000 x 3 matrix that should become a 330000 x 1 column.
View 6 Replies
View Related
Jan 24, 2009
I have a table with three headers:
Types: close to 4,000 total cells in the column with multiple repeats
Amounts: Obvious
Names: Only 6 available names (i.e. Tom, Bill, Fred, Richard, Sam, Alex)
It looks like this:
Type Amount Name
Type 1 | $$$$ | Tom
Type 1 | $$$$ | Bill
Type 2 | $$$$ | Fred
Type 3 | $$$$ | Richard
Type 3 | $$$$ | Tom
Type 3 | $$$$ | Sam
Type 3 | $$$$ | Alex
Type 4 | $$$$ | Fred
What I want to do is create a table with the parameters using the information contained in the previous table:
Type Tom Bill Fred Richard Sam Alex
Type 1 | $$$$ $$$$ $$$$ $$$$ $$$$ $$$$
Type 2 | $$$$ $$$$ $$$$ $$$$ $$$$ $$$$
Type 3 | $$$$ $$$$ $$$$ $$$$ $$$$ $$$$
Type 4 | $$$$ $$$$ $$$$ $$$$ $$$$ $$$$
Is there any way to convert the first table to the second table? I'm using Mac OS/X
View 9 Replies
View Related
Sep 27, 2006
I have train departure times stored in rows for each date as follows:
Mon02-Oct8.399.069.4210.0910.3611.12
Tue03-Oct8.399.069.42
Each time/date is in its own cell.
I have hundreds of entries like this and what I want to do is restructure them as follows (on a new sheet). For each date and time couple I want the date in one cell and the time in the the cell to the right. Also please note that not all days have the same amount of dept. times and this also needs to be considered.
e.g...........................
View 8 Replies
View Related
Jan 9, 2007
I have a report presented in the format such as the one in the attached file.
Current Format.xls
Is there a macro that copies and pastes the data from the original report to a new worksheet with the format such as in the attached file below.
New Format.xls
The reason why i would rather not use Pivot Tables for this purpose is because the pivottable is limiting me from expanding the report to include other looked up data with the AutoFilter option.
View 4 Replies
View Related
Apr 2, 2013
I have several thousands lines of data....much of the data is the same, 2-5 rows per person, but at the last two columns is different numbers/totals....I'd like to get those all into their own column so that each person has one row with all the data...I USUALLY would sit and sort by each total, shift them over to the right into their own columns, then sit and shift them all up to one line...but thats a carpal tunnel project and i know there must be an easier way....subtotalling brings the numbers down to one line once I have shifted each one over, but not the rest of the data....
Pic Attached: Excel problem pic.JPG
View 8 Replies
View Related
Apr 8, 2014
I have a tracking sheet that is used to show where a specific project is within the lifecycle and would like to automatically set a summary value depending on the last data entry within a range of cells in a row and also set it to RAG status depending on the value.....
View 2 Replies
View Related
Oct 9, 2008
I have a spreadsheet with 2 columns of values. I need to check that the two columns have the same values, however the last digit of the values will differ every time, in the first column the value will always be a 3 and in the 2nd column it will always be a 0. Unfortunately the amount of digits before the last, differs from 6 to 9 so its not as easy to do a trim. Example
Column 1 Column 2
11111113 11111110
222222223 222222220
4444444443 4444444440
I need to check that the first digits (no mater how many) are all the same except the last digit.
View 3 Replies
View Related
Nov 28, 2011
Programmatically speaking, any way of checking whether an arbitrary cell is part of a named range (that is, short of looping through an entire book's named ranges checking for intersections)? (It can be assumed that all the named ranges consist only of one cell).
View 6 Replies
View Related
Oct 3, 2013
I am trying to check the cells in column C for a defined set of rows and if it is blank change it to astericks.
Current is the row selected when the macro begins
LastRow is the last row with data (in column A)
For i = Current To LastRow
If Range("C" & i).Value = "" Then Range("C" & i).Value = "***"
Next i
View 6 Replies
View Related
Oct 16, 2013
I am using VBA to indent the values in a range of cells.
However, I would like my code to check if the label has already been indented, to prevent it from being indented further.
View 5 Replies
View Related
Aug 6, 2006
I want to run some macros based on the value of an input cell, but only if the input is a number (ie. it is not a letter or other character).
View 6 Replies
View Related
Apr 11, 2007
Is there any way through VBA that I can check whether the date in cell A2 is Monday or not.
Also the code should allow me to continue if its Monday else should promt a message saying that its not Monday and whether the user still wants to continue. If no it should terminate if yes the next part of the code should continue.
View 9 Replies
View Related
Jul 29, 2014
I have a list of about 600 addresses that need to be reformatted with a space following X character and need to be in all caps. This would be the more tedious way because I would still need to search the other file to make sure the text itself is correct. I saw on a different forum that this line would work in adding a space
(=REPLACE(A1,5,1,MID(A1,5,1)&" ")) but I need to add two spaces and adjust the location of the space so that it is following the first string of text.
The other approach could be to set up a formula or macro that searches the other file with a section of the original text and replaces that string.
View 3 Replies
View Related
Mar 27, 2009
I have a cell in Excel having a boolean value and want to use a macro to check if it is true. Something like this:
View 3 Replies
View Related
Feb 28, 2007
Problem Designing "new customer" form, a textbox(forename) in the
form has the Control source of "B3" (an empty space in my Customer
database). When the form is run and the forname is typed in the box, it
fair enough appears in the Database sheet (in B3).
However, then when opening the form again and typing over the forename
just inserted it will ofcourse overwrite it (B3 is replaced). Any ideas how i can input
code into the sub linked to the textbox so that it checks the control
source and moves down if the source is empty(code checks B3 for text, moves to B4) then the next one (B4 is checked, moved to B5).
Dim topCel As Range, bottomCel As Range, _
sourceRange As Range, targetRange As Range
Set topCel = Range("B2")
Set bottomCel = Range("B65536").End(xlUp)
If topCel.Row > bottomCel.Row Then End
Set sourceRange = Range(topCel, bottomCel)
Set targetRange = Range("B3")
View 9 Replies
View Related
Jul 29, 2014
I am trying to build a user form to find out the customers who purchase more than $1,000 during a certain period. The userform has two inputs:
One is to select the data range of customer information. Assume all customer information are in the cell A2: H10, how shall I write the error checking code if the user selects the range which is out of (A2:H10)? message box would be " You selection include invalid data, please check"..
The other input is called " Get data past this data", and I can enter a date in the following cell ( txtDate). Regarding the error checking, I am thinking to use IsDate() function to make sure it is a valid date. Will be there be any other error checking you will recommend?
View 1 Replies
View Related
Nov 12, 2013
I'm trying to validate the data entered into a series of cells each cell can contain a different set of data but the value N/A is also permitted. For example:
Cell A1 could contain a date from 2013-01-01 thru 2013-12-01 but the value N/A is also valid
Cell A2 could contain a decimal from 0.01 thru 302502.23 but the value N/A is also valid
Cell A3 could contain an integer from 3 thru to 9000 but the value N/A is also valid
When the acceptable values are entered then I want to be able to carry on otherwise I want to pop up with an error.
View 10 Replies
View Related
Mar 23, 2009
I have a master sheet that has 3500ish names on it, and another sheet that I'll need to drop in a list of about 1000 names. What I need on the master is a way to check the dropped in data, find duplicated names, and flag them up.
Now, I believe what I did last time was have a true/false method of telling me if they're on both sheets, then use an IF formula to instead make Trues into "yes" and Falses into "no". However, I can't for the life of me figure out how I had it previously checking both sheets and confirming/denying if they're on both sheets or only appear once.
View 2 Replies
View Related
Mar 6, 2009
i have a problem counting the number of characters in each cell in column "A" in a sheet and checking if number of characters in a cell exceeds 5 characters.
View 10 Replies
View Related
Mar 6, 2009
i have a problem counting the number of characters in each cell in column "A" in a sheet and checking if number of characters in a cell exceeds 5 characters.
View 8 Replies
View Related