Find Last Row Of Data In Column Then Put X In Same Row In Columns
Apr 30, 2012
I have data in column C and Blank columns in D to F
I want to find the last row of data in column C then put an"x" in the same row in columns D,E and F
I am using
Range("C" & Cells.Rows.Count).End(xlUp).Select
to select the last row in column C but how do I go from there.
View 4 Replies
ADVERTISEMENT
May 25, 2013
I am going to explain the issue with a photo linked below
Capture2 | Flickr - Photo Sharing!
Basically i want to match data from column one with data from column 3 if true then copy the data in column 2 to columns 4 in the same match row.
View 9 Replies
View Related
Jun 18, 2008
i have is 3 sheets in the same excel document. Sheet 1 is the mater sheet, which is a compilation of sheets 2 and 3, however the sheet layouts are different.
The sheets consist of a list of names and details. Sheet 1 has all the names in the list, however sheet 2 and 3 only have partial lists that are in a different order from the original list. The details listed next to the names in sheets 2 and 3 are different and hence a straight forward row copy and paste will not work.
What i need is to write a vba script that can take the name from the master list, search sheets 2 and 3 for the name and lookup the variables placed in next to the name, then update the master sheet accordingly, then continue to the next name on the master sheet and do the update again, and so on until all is updated. I have already thought about using lookup functions in excel however there is 1000 names on the list and around 60 details so it would be messy.
View 6 Replies
View Related
Jan 31, 2013
I have a large spreadsheet converted from pdf whose data still appears in A4 reading format.
I need to move part columns of data from 6 columns to form 1 large column in column A.
For example, move range B8 to B76 beneath range A8 to A76 and range C8 to C76 beneath that etc, page by page working through all 270 pages !
Also need to delete unnecessary 'page headers' throughout as in rows 2-6
View 2 Replies
View Related
Jun 30, 2014
I have a excelsheet that looks like this:
Column A | Column B | Column C
Los Angeles | Fire Dept | 3
Los Angeles | Health Services | 12
New York | Fire Dept | 8
New York | Health Services | 22
New York | Internal Services | 100
New York | Public Works | 7
Chicago | Health Services | 15
Chicago | Public Works | 56
Chicago | Social Services | 4
And I am trying to make it look like this:
Fire Dept
Health Services
Internal Services
Public Works
Social Services
Los Angeles
3
12
New York
8
22
100
7
Chicago
15
56
4
View 8 Replies
View Related
Jan 30, 2008
I have 2 spreadsheets, I need to collect the data onto 'figures 07' from column D on 'spreadsheet 07' by date, based on the name matching. ie cell B4 on 'figures 07' should be 166 and cell C4 should be 72. I've tried IF and LOOKUP but they don't give me the correct answer Auto Merged Post;Here is the second spreadsheet, it wouldn't let me attach both of them on my first message
View 4 Replies
View Related
Aug 27, 2013
I am trying to come up with a macro that will find rows that contain the words �as % of Revenue� and then calculate and apply the appropriate formula to the actual and budget columns. I have attached a sample of what the source data look like.
The formula divides the category�s total expense by the revenue in row 4. For a complete macro, I would want to also subtract the budget result from the actual result and put its result in the �better (worse)� column. I need to use this on 12 or so different workbooks which is why I�m wanting a macro.
Here is my attempt to accomplish this task; however, I quickly realized it is woefully inadequate because I neither understand how to apply it to the different columns or how to find the next instance of �as % of revenue�).
VB:
Sub Macro1()
'
' Macro1 Macro
'
Range("B10").Select
Cells.Find(What:="as % of Revenue").Activate
Range("B20").Select
ActiveCell.FormulaR1C1 = "=R[-1]C/R10C"
Range("B21").Select
End Sub
View 8 Replies
View Related
Jun 28, 2013
I have VBA code to perform some actions on data in excel file and then convert all that data into semi-colon separated CSV/text file (code below).
Now, all I want is to add VBA code in the existing macro to find a column header (say, "Application date") and then convert all the dates into YYYY-MM-DD format. The original values in this column don't have a fixed date format.
Code:
Public Sub ExportToCsvFile(FName As String, _
Sep As String, SelectionOnly As Boolean, _
AppendDataOnExistingFile As Boolean)
Dim WholeLine As String Dim FNum As Integer
Dim RowNdx As Long Dim ColNdx As Integer
[code]....
View 3 Replies
View Related
Jul 9, 2009
I have a worksheet with 20+ columns. For this macro, I only need to focus on 4 of them. However, none of these columns are ever in a fixed position so the macro would need to find them by name and NOT by column position. Here they are...
1. Vacation Type (will only have a text value of either "Cold" or "Warm")
2. Vacation Started (will always have a date *x/xx/xxxx)
3. Vacation Ended (sometimes it will have a date '*x/xx/xxxx' and sometimes it will NOT have a date and will be truly blank)
4. Number of Days (currently has ALL truly blank cells)
THIS WHOLE MACRO SHOULD NOT BE CASE SENSITIVE ANYWHERE
Here's what I would like the macro to do...
Scenario 1 - for "Cold" values
Find "Cold" text values in the "Vacation Type" column
"Cold" values WITH a date in the "Vacation Ended" columnIF there IS a date in the "Vacation Ended" column in the same row, put the number of days difference between the "Vacation Started" column and "Vacation Ended" column in the "Number of Days" column.
The amount of days in the "Number of Days" column will determine whether these cells should be highlighted GREY or RED.
A) IF the number of days difference is 7 days or less, highlight the cells in the "Vacation Ended" column and "Number of Days" column RED.
OR..............................
View 12 Replies
View Related
Apr 25, 2013
I have a macro that converts all my PDF Purchase Orders to a text file and inserts the data/text horizontally into another document. However because the PDF's or the text within the PDF can be fomatted differently (that is on different lines etc) it therefore imports the information and it looks mis-aligned.I have attached a simple spreadsheet showing some sample text as it is imported and then below this how it should look like, all in line.
The range where the highlighted text in red is, is variable (but say nothing more than a variant of 10 columns). The text can also be Uppercase or Lowercase.So, I was wondering if there is macro code to find the "text" on various rows/columns and align it all in another column?
View 2 Replies
View Related
Jun 26, 2009
I would like to find the last row in my sheet containing any data in the columns A:O and select the cells in the range of A:O to that last row. I would then like the code to name this selected range as IMPORT.
View 9 Replies
View Related
Mar 28, 2014
I need to find the data in the sheet SKU & match it to the data in import_215 column F if it matches then delete the entire row (see Attachment SKU3)
View 12 Replies
View Related
May 22, 2014
I've a table and in the first column titled 'VALUES' (A1) I've entered values ranging from 1 to 100 (A2:A10). In the second column titled 'STATUS' (B1), 'closed' or 'NA' is entered (B2:B10). Now I need to find how many cells are there in the table with 'closed' status in the range 0-25, 26-50, 51-75 and 76-100.
VALUES STATUS
34 Closed
56 NA
44 Closed
98 Closed
18 NA
82 NA
23 Closed
40 NA
63 Closed
71 Closed
Closed Status Count
0 - 25 :
26 - 50 :
51 - 75 :
76 - 100 :
View 1 Replies
View Related
Mar 14, 2008
I'm trying to come up with a formula to find the last row without any data in columns E and F and delete the 10 rows below them. Is there a way to do this?
View 3 Replies
View Related
Feb 4, 2010
In the attched sheet I have a list of employee ID's in column A and the Employee's Line manager ID in Column B. In Column C I need the Line Manager at the top of the pile so to speak. These line managers are listed in column J (J2:J6)
At the moment I have been writing formulas accross 11 columns (there are 11 possible levels) to check the line managers ID in Column A and see if their line manager is in the top manager list, I do this formula for all 11 columns until the line manager in the list is found. If the Line Manager is in the list I simply repeat it for the next columns. The end result is that in the 11th column all employees will have one of these Line Managers from the Top List in their row.
Is this possible to do through VBA? I have thought about how I could do this through VBA but I have just hit a brick wall.
I'm not asking for someone to do all of this for me but if someone could give me a couple of hints around how to look up a value in a list through VBA and if it is even possible to repeat that process per line until the match is found, that would be great.
View 7 Replies
View Related
Feb 17, 2007
I need help creating a formula to find data in one column that starts with different letters and counts them up.
For example one column would contain the words amoung others:
DPDE
DNPD
EPRO
EOTH
YBRC
YUND
In the other column I want to count up the amount of times a word starts with the letter D or E or Y. The count comes from another spreadsheet, which the CMRF Tool (See attachment) is pasted at the bottom of.
The Monthly case report file is the file I want to get the count from. These would come from Column O once the data is there. The count would end up in column D of the CMRF tool which is pasted at the bottom of the monthly case report file.
View 9 Replies
View Related
Sep 26, 2007
I have two columns of account numbers. Column A would be considered the master list. Column B is data that changes on a monthly basis. What I would like is for a macro to compare column B to Column A and if it finds any account numbers not listed in column A it will insert a row into column A and copy/paste the account number from column B to A. Both rows are sorted assending so if its possilbe I would like the macro to insert the account number where it belongs or maybe just resort column A once it has finished. My knowledge of macros/VBA is very limited at this point
View 2 Replies
View Related
Apr 27, 2014
I have data (e.g. PPL0106AU) in columns A (Rows 2 to 104) & C (Rows 2 to 303) and need to identify which entries are in BOTH columns.
I've entered in column B: =IF(MATCH(A2,C$2:C$303),A2,"No")
This formula is resulting in a duplicate of column A in column B.
View 7 Replies
View Related
Mar 2, 2007
I would like to compare some keyword lists if possible.
I have a large list of Unique keywords in Col A (From A3),
This Column is called Keyword List A - Large"
I then have a keyword list in Column C (From Cell C3),,
This Column is called "Keyword List B - Small.
I then have a column called "Unique Keywords Found",, This is Col E,, with hopefully returned results being entered from cell E3 downwards.
What I would like to be able to do if possible is run a Macro that would compare all the unique words in ColA and C and return only the difference, (The Unique words not found in ColC as Col A is the "Master List")
If possible could a pop up box appear saying
===================
List A No Rows:xyz
List B No Rows: xyz
No of Uniques Found : xyz
Time Elapsed (sec): xyz
===================
I'm running windows XP and Excel 2007.
View 9 Replies
View Related
Sep 2, 2007
I have a spreadsheet (XL2003) that calculates some price data based on a specific algorithm. The program then determines which price data meets a certain criteria and if met, will place the value in a column ( Column C in the example WS attached.) If criteria not met the cell is returned empty. Under certain settings, this column could have values in all rows (C9 to C27 in the example) but is usually just a specific consecutive list as in the example.
I have to transfer the calculated values to another spreadsheet so I want just these values to be initially transferred to a separate column (Col. H in the example WS.) from which they can easily be transferred later to the other spreadsheet. I need to figure a way for a macro to check in col. C (ie C9) and if there is a value in the cell, to transfer it to the next available cell in Col H (Starting with H9). The macro would then look at the next cell down in Col C (C10) and do the same routine until the last cell is reached. The transferred data would then end up in consecutive cells in Col. H. I have shown in the example attached how I would want the data to look after the macro is run. I figured this is some type of loop but could not see any examples in the forum that would do what I need.
View 2 Replies
View Related
Feb 2, 2014
I have 2 different sets of data: temperature data recorded at meteo-stations defined by latitude / longitude, and major world cities also defined by latitude / longitude.
After the user chooses the station's coordinates, temperature data is pulled out from the first data set; this works! However, I would like to be able to provide information about the closest city to the chosen meteo-station from the second data set.
File attached with sample data sets.
View 14 Replies
View Related
Sep 29, 2009
The foloowing is a column in my worksheet:
Sheet1A1WIRE CODE210PN90J310PN90K4510PN90HA610PN90J710PN90K810PNJ7#1DB91010PNJ9#86DRN1110PNJ9#86GN1210PNJ9#86YL1310PNJ9#87DRN1410PNJ9#87GN1510PNJ9#87YL161710PNJ9#85DRN1810PNJ9#85GNExcel 2003
you can see that A4,A9 and A16 are blank,
what i need is a code which will find out until which row in column A has data and should enter that row number in cell B2.
For eg in above sheet after running the code i get "18" in B2.
View 9 Replies
View Related
Jun 1, 2008
i want a formula that takes a value from the 3rd to last" column to the left of the last column but the last column is not static. so 1) i need to find the last column. and then 2) i need to take a value from the column 3 columns to the left of the last column. how do i do that using excel formulas?
View 3 Replies
View Related
Nov 29, 2007
I am unsure how to go about this....
View 9 Replies
View Related
Jun 4, 2008
If I have columns A-F and the 1st time a number appears in that row I want to know the column number, so if the first time a number appears in column 'C' I want it to return 3.
View 9 Replies
View Related
May 30, 2009
I was wondering if it is possible to perform a find and replace which would replace data from another column. We have a lot of data fields of our inventory that we exported which we are trying to condense for another program.
Example: I have a description column (AV) that has [[Manufacturer]] within the description. We want to find [[Manufacturer]] and replace with our data column (DD).
This is the data that has our manufacturers name in it. We have several find and replaces to do within the description column besides the above field.
View 9 Replies
View Related
Jan 14, 2013
I need a macro to find the last cell in the column, then copy the formula to the next blank cell. Then, it goes back to the last cell (above) and paste's values. Then, go to the next column and repeat the process. I can do this but have to call each cell separatly...however, I would like to do it in a loop to simplify things. It would be great to even be able to just set the start and ending columns. Here is my current code:
Dim rng As Range, aCell As Range
Set rng = Range("C8, D8, E8, F8, G8, H8, J8, K8, L8, M8, N8, O8, P8, Q8, R8, S8, T8, U8")
For Each aCell In rng
Selection.End(xlDown).Select
Application.CutCopyMode = False
[Code] .......
It does not go to the next column, instead it stays in the same column and repeats the process.
View 8 Replies
View Related
May 27, 2014
There are groups of similar ID numbers in Column J. For a group of similar ID numbers in consecutive rows there is only one row that has a number greater than 0 in its Column L cell and the rest of the cells of Column L for that set of similar IDs is filled with 0s.
First for that unique ID group I need to find out which row is it that has a value greater than zero in its Column L cell.
Then I need to use that value to fill the rest of the 0s in Column L corresponding to that set of Unique IDs.
The process continues with identifying similar IDs in Column J and this time doing the same thing for their Column M. I have attached a sample file that shows the data and how the results need to look like.
View 3 Replies
View Related
Mar 11, 2008
I have exported a text file from a universe database and need to import it into excel.
Below is an eg of one section. The text file contains approx 257 of these, all one below the other.
Between each set of dotted lines is one user profile (not data all shown in eg) .
Each one (user) is NOT the same amount of lines(rows) deep and only the dotted lines separate each user.
A simple import places all data into one very long column.
I need a way to place each user in there own column.
I have user names as column headings the labels of the values below as row headings. I cannot change this.
Manually entering the data took a very long time and i need to update this workbook regularly.
In the text file, " the variable......: value " (eg UserCode.....: XYZ) sets are all lined up so that using a text editor, with column mode, I can delete all the data headings/labels up to the space after the colon.
This leaves me with 7000 rows of values (eg XYZ) one column wide and various numbers of rows deep per user.
Is there a way to import the data and seperate each user via the dotted lines or other so that each users data is contained in consecutive columns. 1 user profile per column.
The standard import utility allows for column placement (delimted, fixed width). Can this be done on rows, sort of flip it 90 degrees and use the dotted lines as column markers. Just guessing now. Any and all assistance would be most appreciated.
Another issue (not as important but still helpful) is that the "procudures barred" section of user profile can also be one row(line) or serveral. Problem is each Name...:Value set must be on one row(line) for everything to match in the work book.
Using custom macros in my text editor i moved all the 'proc. barred' data to a single row. Alot of manual editting was involved and any ideas on this area would also be muchly appreciated.
One EG user profile (not shown, but all the colons line up) ....
View 9 Replies
View Related
Jul 10, 2014
I have attached a file to make this easier. Basically I would like to search "Points Scored" (B2:W9) for the highest score (which I already have done) and when it is found return the team's name that is associated with it. Then do this for the second, third, etc. as it can be seen in the "Main" sheet. I'm thinking an index/find approach, but I just keep getting "N/A".
View 7 Replies
View Related