Sort Data By Comment Contents / VB Macro

Oct 3, 2009

please have a look at the attached file.

I want to sort the data by the comments in Column B, specifically by comments that do contain a telephone number, whether it is "Telefon" ( e.g. in B17 ) or "Phone" ( e.g. in B24 ) or "Téléphone" ( e.g. in B16 )

I know a Macro written in VB could do that.

View 8 Replies


ADVERTISEMENT

Copy Contents Of Multiple Comment Boxes And Paste In Single Comment Box

Mar 13, 2014

how to copy the contents of multiple comment boxes and paste in a single comment box.

The big picture is that I have a number of cells with numerical values in and text in comment boxes. I want to be able to click a button to copy the contents of the comment boxes and paste them, along with the numerical value from the cell, into a single comment box, ordered by highest to lowest value within the comment box, then delete the original cells and comments.

I am quite new to VBA but have been coping quite well so far with information of the web and analysing recorded macros.

View 6 Replies View Related

How To Link Contents Of Cell To Comment

Jan 19, 2013

if its possible to link contents of a cell to a comment.

IE - Whatever the cell contents in sheet 1 A5 would reflect in the comment in sheet 2 A5 Im happy if its coded that would work.

View 4 Replies View Related

Can You Turn Cell Contents Into A Comment

Dec 19, 2008

I was wonder if there was a way to automatically turn the contents in cell B2 into a comment for cell A2?

Is there a formula or some kind of automated macro or function?

View 9 Replies View Related

Extract Contents Of Cell If Greater Than Zero To A Comment

Dec 30, 2009

I am trying to extract contents of cell to a comment.

Column K is Overtime Hours
Column L is Regular Hours

I have managed to create the following macro that will copy the contents of a cell in Column K and put it as a comment in Column L. But I am needing the macro only to create a comment if the value of the cell in Column K is greater than 0

View 2 Replies View Related

Insert Contents Of A Cell Range Into A Single Comment

Feb 15, 2009

I would like to Insert the contents of a Range of Cells into a single Comment. ie:
The contents of Range A1:A50 into a Comment placed at F1. Is there a Macro that will do this?

View 3 Replies View Related

Excel 2010 :: Add Comment To Cell Without Changing Cell's Contents?

Mar 13, 2012

How, via VBA, would I add a comment from a userform (text box name: txtReason) into a cell that may already have a comment in it? I would like to keep the comment that is in the cell and then have the program add a "/" and the next comment from txtReason..

(using excel 2010)

View 2 Replies View Related

Paste Copied Contents Of A Cell As A Comment In Another Cell

Sep 7, 2012

I am working on a database and trying to remove duplicates. When there are duplicates, I want to take the contents of one cell and copy them as a comment on the cell above (or below).

I tried to work on a small macro to do so, but the contents of the cell cannot be copied (it comes out as a blank).

The long way is to 'double click' in the cell, Ctrl+A, cut, click the cell above, Ctrl+F2, paste. This way is very long as I have thousands of duplicates.

View 4 Replies View Related

VBA To Select Rows And Sort Contents

Dec 21, 2008

I'm trying to sort a whole list of data that's been separated into blocks with a row containing the value "a" like:

row 9 a
row 10 455
row 11 8892
row 12 34
row 13 a
row 14 578
row 15 92
row 16 a

etc..

I want to sort each block into ascending order using VBA code and then add in some extra code to do some more analysis.

The data to be sorted is in Column D, and there are also values in Column C and B that need to be sorted with the Column D values (so that they stay in the same rows).

View 9 Replies View Related

Clear Contents, Copy And Sort

Jan 18, 2007

I have 10 separate files that each have a data input sheet. I have 1 master file that has all 10 sheets in it and an extra sheet to display all 10 sheets information on 1. The drama I am having with sorting the master sheet is that every cell in the 10 sheets has a formular to copy what in the corresponding cell within the separate file. So techincally, the cells are not blank.

The cells range is B5:G1004 on every sheet. I paste 'values only' from the range of each sheet into the master sheet, but when I go to sort column B Ascendingly, it puts all the data at the bottom of the rows and there is 10000 rows on the master sheet. I cant get it to flip around. What I need is a way to clear the cells on the 10 sheets that do not have a value before I paste into the master sheet.

View 6 Replies View Related

Hide Contents Of A Cell But Not Remove In A Sort

Mar 13, 2009

Is there a way to hide the content of a cell that already contains a formula but when you sort it and remove the blanks it not remove that cell?

View 2 Replies View Related

Pass The Contents Of A Listbox To A Function To Sort It Into Alphabeticalorder

Mar 3, 2008

I'm trying to do is pass the contents of a listbox to a function to sort it into alphabeticalorder. I get a error saying object required

Sub PopulateAll()
Dim lgLastRow As Long
Dim lgRowCounter As Long
Dim intCounter As Integer
Dim olb As MSForms.ListBox

For intCounter = 0 To UBound(vAllEnv)
Me.lstAll.AddItem (vAllEnv(intCounter))

Next intCounter

Set olb = frmOptions.lstAll.........................

View 9 Replies View Related

Macro To Sort The Data

Jun 27, 2009

I need to sort the following data by the CODE number shown while keeping the Description and Quantity attached to the various codes. (Excel is smart enough to first sort the codes numerically then alphabetically, which is what I need) The client info (bottom) also needs to be left alone. Done correctly, after running the macro, the order would be 04cls, 04fba, 08jud, with the Desc. and Quantities moved with the codes. At the moment each line is stored in a single excel cell.

Description = Item1
Code = 08jud
Quantity = 1

Description = Item2
Code = 04fba
Quantity = 1

Description = Item3.........................

View 9 Replies View Related

Macro To Sort And Delete Data

Mar 31, 2008

I am looking for a macro to do the following:

Once data is copied to a tab labeled "data", it will sort on column H and delete all rows of data that do not have a AI or an RI code on it. Is this difficult to do?

View 9 Replies View Related

Macro: Sort Data Around Selection

Dec 22, 2006

how to sort a selected range.

The end of the range could be any cell. The top of the range is fixed in A1.

I've tried with this:

Sub Order()
Dim final As Variant
final = Selection.End(xlUp).Address
Range("A2").Select
Range("A1:" & final).Sort Key1:=Range("C2"), Order1:=xlAscending, Key2:=Range _
("G2"), Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase _
:=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, _
DataOption2:=xlSortNormal
End Sub

View 9 Replies View Related

Macro Code To Sort Data

Jun 29, 2008

i want to create a command button that would sort my data in descending order.

View 7 Replies View Related

Complicated Macro To Copy And Sort Data

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

Sort Data Macro Then Copy / Paste

Dec 26, 2011

I am looking for a macro that will allow me to the following:

- search column F for "word1", "word2", "word3", and/or "word4"

- then match the search to row on column C data

- then copy/paste row or rows of matched data unto "Sort" worksheet but only data from columns A, B, C, and F

- also, when copying, copy the row above

View 2 Replies View Related

Macro To Sort Data And Then Copy To Different Sheet

May 5, 2012

I have a worksheet(1) that contains data like: date, name, price, size....etc. I need to "sort" by size (only use 2 values - large and small), then copy each to another worksheet that saves data by the Month. The amount of data on worksheet(1) changes monthly.

View 9 Replies View Related

Adjusting Macro Code To Be Able To Sort Data?

Oct 17, 2012

I have a worksheet that is automatically updated based on actions in other sheets. There are 10 columns of data (A-J) Headings are on row 6 and data starts on row 8. I have created 3 buttons to sort worksheet by client column (B), year-end column (E) and to bring it to original order (by numbers in column A). I have created the following codes that I have assigned to each button however it does not work.

Sub Macroclient()
Columns("A:J").Sort Key1:=Range("B8"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub

[Code]....

View 1 Replies View Related

Automatic Column Data Sort Without A Macro

Mar 6, 2008

a way, without using a macro, to have a specific column automatically sort data being pulled in from another column, so that even if the data from the initial column gets changed, that the destination column will take that change into effect and update the sort automatically?

View 9 Replies View Related

Macro To Sort Multiple Rows Of Data

Sep 16, 2008

I have a report that I drop down into Excel that is a transaction report for securities. The data for each security is in two rows. I would like to write a macro that would sort each two-line group by a certain cell in the group. If I could make the macro request the number of rows and columns in each range and the cell address of the cell to sort by, I would be able to use this macro for many different reports. Also, there has to be some way of telling the macro where to begin and where to end. I have some experience with macros although generally I "Frankenstein".

View 9 Replies View Related

Macro To Sort A Column After Entering Data

Feb 5, 2009

I have a concatenated value in a column D (from three colums A, B and C). Whenever a user enters data in colums A, B and C, I would like to get a sorted list of values from column D to be populated in column E. I use the sorted values in Column E for a dropdown list in another worksheet. Could somebody help me with the macro code?

View 9 Replies View Related

Create Macro To Sort And Move Data

Jun 5, 2009

I have sheet 2 with a table with data in A2 thru X500, A1 thru X1 are my headers, A1 data is either Forecast or Sold, B1 data is Month, C1 is Value. I first need to Filter the data by Forecast, then by a specific month then by the value in decending order (keeping in line the data thru x which are headers I don't need to sort by). Next I need to take the 1st 10 lines by a specific month; A thru X and copy it onto a defined section on Sheet 1.

I then need to do this for the 2 more times for the 2 proceeding months. So If we start with Jan, I need the macro to do Feb and march as well.

The end result is that I have Sheet 1 with 3 sections on it each section is 10 lines and the resulting data is my top 10 forecasted deals for Jan, Feb, March. The macro must be able to do this for each month, so if June is chosen the 3 months are june, july and Aug.

View 9 Replies View Related

VB Macro - Sort Data In Columns Within Active Spreadsheet?

Feb 12, 2014

I am new to VB Macro creation and I am creating VB Macro which will:

1. Sort data in Columns within an active spreadsheet

2. Create new Worksheets

3. Delete Values in rows based on value in Column.

I have listed my "Step by Step" instructions in the tblTest Excel file on attachment. The instructions are clear and straight to the point.

Below are some VB Macros I was experimenting with but it is not complete.

Sub Sort_Ascending_With_Header()
'Sorts a worksheet in ascending order and assumes there are headers on the data
Range("A1:DZ20000").Sort _

[Code].....

View 2 Replies View Related

VB Data Sorting Macro Unable To Sort Correctly

Jul 12, 2009

I am putting together multiple worksheets with dumped data that should sort themselves by the press of a button. Each entry has a 'code' and a value and they are sorted by the 'code'.

At the moment i have the first worksheet sorting correctly and i am trying to program the second worksheet to sort data into the existing worksheets if they exist or create a new worksheet if the data doesn't have it's own worksheet.

Here is the code i am working with.

View 12 Replies View Related

Macro To Create Pivot Tables And Sort Out Data In Other Worksheet

May 19, 2009

The first sheet is the row data given to me, the second one is where I want my data to be analysed automatically by macros.

I managed to create a pivot table manually to give me the info I want but then I still have to copy all the results from the pivot table sheet to my analysis sheet.

How can I create a macro able to do all that by it self? I tried to record a macro using the recorder but then when I try to play it it gives me an error straight at the beginning in the definition of the pivot table I think.

An example of what I want the pivot table to do is:
in the first sheet, go in the small table in column K and L, take the value of L1, then in the row data in column A to J, in column C look for the value in L1, once found, look for the value 1 in column J then do the average on the values in column E and put the result in my second sheet in cell F5
then do the same but look for 2 in column J and put it in F8, then 3 in F11, ... until 7 found (the data is in ss.000 and so the results in the second sheet should be formated the same way)
then do the same all over again for value in L2
etc etc etc

this should be done for the 6 values in column L, each having values up to 7 in the J column.

Then I need to do the same for other columns and not only averages but minimums as well but I can adapt the code I think.

View 14 Replies View Related

Macro To Sort And Align Employee Data In Multiple Cols To A Header Row

Jul 9, 2014

I have an issue with an export file which is produced in CSV format and needs to be aligned. I have attached a sample of what I refer to.

My Source excel file looks like:

ABC A-101 B - 202
DEF B-203 C - 100

The destination should align with the relevant column headers and place a blank if it doesn't match. Other have queried a similar thing, however my header and data and description is actually in the same cell with a dash separating them.

The output I want is:

A B C D
ABC 101 202
DEF 203 100

There are multiple row of employees with varied column headings as its dependent on what system access the user has. The headings i.e. A,B,C for example is a fixed number of headers.

In my real data set the headers represents a 3 letter system prefix e.g. ZCR,ILP etc

View 1 Replies View Related

VBA Code To Sort Data - Run-time Error When No Data To Sort

Mar 4, 2010

I havet he following code which sorts data. If there is no data to sort I keep on getting a run time error. Could I add something to my code to prevent the run-time error, as sometime there won't be any data to sort. The code runs when I switch to the worksheet in question.

Sub SortMeetings()
Dim iCTR As Integer
Dim yCTR As Integer
Dim zCTR As Integer

zCTR = 11
For iCTR = 12 To 23
For yCTR = 1 To 10
If Len(Range("D" & iCTR).Offset(0, yCTR)) 0 Then
Range("AA" & zCTR).Value = Format(Range("D" & iCTR).Offset(0, yCTR), "HH:MM") & " " & Range("D" & iCTR).Value
zCTR = zCTR + 1
End If
Next yCTR
Next iCTR
Range("AA11:AA" & zCTR).Select
Selection.Sort Key1:=Range("AA11"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub

View 9 Replies View Related

Macro To Automatically Sort Multiple Column Groups Separately As Data Is Entered

May 20, 2014

I have a worksheet that contains multiple task lists, each having two columns, a "Priority" field and a "Description" field. The data should be sorted by Priority first and by Description second. The header row is 5 and the data is in rows 6 through 50. The first list is in A5:B50, the second C5:D50, and so on until the sixth list in K5:L50. I have a macro that works for one task list, but cannot get it to function for multiple task lists. Below is the macro that functions for the first task list. It is in the code for the sheet tab.

Option Explicit
Private Sub Worksheet_Change(ByVal Target1 As Range)
If Target1.Column = 1 Then

[Code]....

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved