Find Min And Max In Columns?

Feb 16, 2014

i have a matrix and want find min & max this matrix. know must use For and IF for example for MIN: i want "a" compare "b" and if "a" < "b" then "a" is local optimum else b is local optimum then "c" compare "a" if "a" < "c" then "a" is local optimum else c replace a and c is local optimum &... until find Global Min

but i could not coding this in VBA EXCEL!!

i do not know number of my columns user will define it so for example i can't use Range("A1")

My problem became greater because at start user will define a number for every column(1 or 2)
and if column value was 1 for example find Max column and put it in cell(1000,1000) then find min column and put it in cell(1001,1000) else i.e if column value was 2 find min column and put it in cell(1000,1000) then find Max column and put it in cell(1001,1000)

numerical example:
column 1: 12 13 15 14 16
column 2: 8 10 9 2 3

and column value for column1 equal "1" and for column 2 equal "2"

so for column1 in cell(1000,1000) will write "16" and in cell(1001,1000) will write "12"
but in column2 because column value equal 2 will have: in cell(1000,1000)= 2 and in cell(1001,1000)=10

View 1 Replies


ADVERTISEMENT

Find Wont Find Existing Text When Columns/Rows Hidden

Oct 8, 2006

Attempting to hide columns (of cities) via VBA generates an error when that same city is reselected (either individually, or as part of the group) in the list box, upon clicking the 'Hide' button.

The error happens at this point: ...

View 3 Replies View Related

Find Values That Appear In Various Columns

Apr 18, 2014

I have 6 columns containing Agency IDs of different years. I would like to know which agencies appear in all the years. That is which agencies were funded for all the years. How can I do this? perhaps Vlookup?

View 11 Replies View Related

Find Matches In Columns

Oct 27, 2008

I have two lists of email addresses in columns and I need to find the matches between columns and have those addresses returned to perhaps a third column.

View 2 Replies View Related

Find The Number In Columns

Jan 27, 2009

I have a number in column “A” and I want to match them with column “D“, the number in column “C” and “D” is true value. find attached sample sheet for more detail.

View 6 Replies View Related

Find Ranges Between 2 Columns

Nov 29, 2008

I have a 3 column table that goes:

FROM: /// TO: /// Value
0 /// 25,000 /// x
25,001 /// 50,000 /// y
50,001 /// 75,000 /// z

etc etc.

I then have another table ( 2 columns) with the first column being inputed values from another worksheet. This inputted number will fall between one of the ranges. The second column needs to have the appropriate VALUE from the above, 3 column table.

How do I go about making a Vlookup that can find ranges between 2 columns?
So if I have a value of 30,000, it will return "y".

View 14 Replies View Related

Find Last Date Across Columns?

Feb 5, 2014

I have Dates as column headings, People going down across rows, and their corresponding budgeted hours:

Person Last Day 1/1 1/8 1/15
Bob ? 45 45 0
John ? 45 0 0

I need a formula in the "Last Day" column that can pick up when a person rolls off the project, i.e. has a value of "0" or "-".

I need this because I have a spreadsheet with thousands of resources and don't want to comb through, manually looking for their last day on the project.

View 3 Replies View Related

Find Hidden Columns

May 19, 2008

How to find out which columns are hidden on a worksheet that has ~20 columns using VBA.

View 3 Replies View Related

Find And Match Between Two Columns

Aug 2, 2008

I have records on columns A and B. I need to find the matches between the two columns and insert it into column C. My sample only shows a few. But my actual data has hundreds of records.

View 9 Replies View Related

Find Numbers From Various Rows / Columns?

Mar 2, 2013

I am trying to find some number which i have from a list of numbers available in various rows, for eg

11

7
11
13
17

i am tryng to find 11,13,14,15,16.... 38 from columns given i.e. 7,11,13,17....

View 3 Replies View Related

Find Sub String Matches Between Two Columns?

May 30, 2014

I am trying to match words in two separate columns that are not exact matches. any formulas or codes I can write to do this.Below is an example.

Column A
3m Corporation
Apple Inc
Allstate Corp
State Farm

View 2 Replies View Related

How To Find Common Values Among 3 Columns

Dec 11, 2013

I have a fairly large timecourse dataset and I need to find all common values within all 3 columns. Also, when I find these 'common values' is there a speedy way to retrieve data in the same row that is associated with these values, instead of going back one-by-one and copying and pasting beside the value that the function has returned?

View 10 Replies View Related

Find And Replace Based On Columns

Dec 27, 2006

Here is the problem: A1 contains : current model numbers, B and C contain new model numbers and corresponding old part numbers. Based on Column B and C I need it to go through and find all the old part numbers in column A and reaplce it with the new part numbers: Here is my table:

Current # NEW AFS# current #
10773650204020000216802606
10773652204022000116035305
10773653204023000115744805
10773654204023000215744806
10773657204023001215744881
10773658204023022715744844
10773659204024000115836205

For example, I need it to find all instances of "10773650" (first data in column A) and look in column C to find the corresponding number if it exists, if it does exist I need it to be replaced by the corresponding data in column B

View 10 Replies View Related

Use Find To Search Columns By Default??

Feb 10, 2009

It always hassles me to have to change the default setting of FIND to search by Columns instead of Rows.

My question is simple: Is it possible to change the default setting so that every time I use FIND it will search by Columns by default???

View 2 Replies View Related

Find Number Of Columns In A Worksheet

Mar 18, 2009

I believe this rightmost column number information is available. I just could not find it!

View 3 Replies View Related

Text To Columns - Find And Replace

Jun 20, 2013

I work at a club. I've got a spreadsheet sent to me from another club we do business with. On it are charges from their club to ours that list the charge and associated member number.

I'm trying to use the text to columns feature to separate the member number from the other data in the column so I can sort by member number making it easier for us to bill our members.

Here is a sample of the data:

"Beach Club Bar,b500"
"Beach Club Bar,s200"
"Beach Club Bar,a150"

When I try to use text to columns what happens using the comma as a deliminator, everything including and after the comma disappears.

Thinking that maybe I needed a space between the comma and the member number (in the first line b500 is the member number) I tried to use find and replace to replace , with , and a space after it. This also resulted in all of the data including and after the comma disappearing. I'm sure I'm missing something here.

I tried copying the data into a separate spreadsheet. Tried changing it to text or general.

I typed in the exact data as you see it and tried the text to column function and it worked perfectly. What could be hidden in the data in that column that's causing this?

View 7 Replies View Related

Find And Copy Last Cell Value In Columns A And B

Mar 30, 2014

Problem: Unable to retrieve last cell value in both columns A and B with the following formula.

Range("A2:B2").End(xlDown). Copy

Presently this only finds the last value in column A and copies that value.

Would like to know how to modify/change the range to look for the last cell in both columns A and B?

View 12 Replies View Related

VBA: Find Text In Rows And Columns

Jan 26, 2009

i am trying to write a macro to find the text "total" in the first row and first column. and this macro works fine for first row:

View 5 Replies View Related

Find Matching Number In Two Columns

Jun 11, 2009

I want to loop through ID Column and find the matching number in Record No.column, and hightlight the entire row when match is found. The code I am running can only work for one cell at a time, but I want to run one time.

View 11 Replies View Related

Find Replace For Multiple Columns?

Oct 28, 2011

I have been put together some simple coding to find and replace a value (1) that i have obtained from a pivot table. My aim was to replace any "1" with the column header. The reason for this is that the cell(s) will be used in a VLookup at a late stage.

My problem is that I have the code to work for a single cell, but I want it to work for multiple columns so I don not have to create multiple macros.

I need to go from Column C to AW. I have a total row at the end - hence why I am using 'Step - 1'.

Code:
Sub FindReplace()
Dim i, lRow
Application.Calculation = xlCalculationManual

[Code]....

View 7 Replies View Related

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 View Related

Excluding Certain Columns With Find And Replace

Mar 22, 2013

I am writing a macro that will find several different values in sheet1 and replace them with values from a table in sheet2. It currently does exactly that but I realized that there are instances when replacing hyphens isn't appropriate and will ruin the upload of my data. I need to replace it in the rest of the columns though. The headers will always be the same, such as "MST" , so I could use that as a conditional statement I just don't know how to go about it with the replace function.

Code:
Sub FindAndReplace()
Dim LastRow As Integer
Dim i As Integer 'Counter to loop through all the rows found in the table

'Finds the last row used in my replacement table and sets that as the searchable range

LastRow = Sheets("Sheet2").Cells.Find(What:="*", SearchOrder:=xlRows, SearchDirection:=xlPrevious,

[Code] ..........

View 2 Replies View Related

How To Find Duplicate Columns And Sum Values

Mar 28, 2013

I got 2 excel pivot tables with 2 columns.

Table 1 (Sheet 1) -- Column A and B - input

3
45
4
12

[Code].....

I want to compare both tables, finding the same Number on Column 1 for each table, and sum the values of column 2.

View 1 Replies View Related

How To Find Earliest Date On Row Across Six Columns

Apr 5, 2013

I'm trying to find a formula that will return the earliest date in a cell looking at the six columns to the left of the earliest date column.

See below for example.

Employee Date1 Date2 Date3 Date4 Date5 Date6 EARLIEST DATE

Long Johns 7/1/2012 7/1/2012 7/1/2012 7/1/2012 7/1/2010 7/1/2012 7/1/2010

View 2 Replies View Related

Find The Next Columns Empty Cell

Mar 23, 2014

I have this code to look into the "find" match in Column A, and then search to the right for the next columns empty cell and update data. but it seem like the code can only manage to offset 1 and update data to Col B, instead of find the next empty cell to update data.

Code:

Dim vFind1 As String, vFind2 As String, rFound As RangeDim bFound As Boolean
vFind1 = Me.CBSupplier.Value
vFind2 = Me.CBProducts1.Value
Set rFound = Sheets("Main").Range("A:A").Find(Me.CBSupplier.Value, LookIn:=xlValues)

[Code]...

View 2 Replies View Related

How To Find And Delete Columns Containing A String

Apr 18, 2014

I'm looking to loop through a worksheet with over 1000 columns and would like to delete columns containing a percent sign (%) in the header row which is row 4. Column range to search would begin at column 12.

View 4 Replies View Related

How To Find Corresponding Values Spread Across Different Columns

Apr 28, 2014

I have a workbook with two sheets, and I am having difficulty in finding how to match up the data.

Sheet 1 (named "TS") consists of several columns, but it's always a series of date columns followed by multiple site numbers.

Sheet 2 (named "Dates") consists of just two columns, a site ID and a Date column.

I am having difficulty in finding how to lookup/match the date that goes with the store number, as the information in Sheet 1 (TS) is laid out in a horizontal fashion.

So, for example:
Sites: 14352, 14425, 11661, 404, 8142, 3571 should all have the date of 5/17/2014.

As such, on Sheet 2 (Dates), whenever those site IDs are encountered, the date of 5/17/2014 would need to be applied in col B.

Similarly, on Sheet 2 (Dates), for site IDs 1201, 3613, 9316, 9735, 13211, 7640, the date of 6/21/2014 would need to be applied in col B.

Here is a link to a sample workbook: [URL] ........

View 1 Replies View Related

Find The Last Row In Sheet Containing Any Data In The Columns

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

Find Common Numbers Between 2 Columns

Aug 26, 2008

I need to find out common numbers between columns. Each column has multiple number entries seperated by a comma. For example:

Column A: "5592,12222" and Column B: "1,2,3,4,5592,123123" and Column C: "3, 4"

I need to find out any numbers that are found in more than 1 column. Hence, the result should be something like "3,4,5592". If no match is found then maybe can indicate by coloring the cell. My data is over 50,000 rows and 30 columns. I need to do this for each row one by one.

View 6 Replies View Related

Find Empty Cell Across Columns

Jul 11, 2006

I am trying to find the last cell across the columns in a specific row. i can do it going down using

Range("N6").Select
Selection.End(xlDown).Select

but can not get it to work going across.

View 2 Replies View Related







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