Previous in Forum: Looking for a Good Free OCR   Next in Forum: rslogix 5000 Issue
Close
Close
Close
24 comments
Rate Comments: Nested
Commentator

Join Date: May 2011
Posts: 76

Excel Logic, Who Will Solve This Problem Please?

01/09/2015 6:59 AM

Hi All,

I am trying to use logic functions in Excel to solve the below:

..........A............B...............C.............D

1...... 100....... 2:00am....... 300....... 4:00am

2.......200....... 1:00pm

3....... 300...... 4:00am

C is the max value within A Column, but in D is the same time of that max value of same raw of A, how the logic funtion will be at D? I want to copy the same raw b of the max value of A at D.

regards

Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.

Good Answers:

These comments received enough positive votes to make them "good answers".

"Almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, vote them!
Guru
Engineering Fields - Optical Engineering - Member Engineering Fields - Engineering Physics - Member Engineering Fields - Systems Engineering - Member

Join Date: Apr 2010
Location: Trantor
Posts: 5363
Good Answers: 647
#1

Re: Excel Logic, who will solve this problem please?

01/09/2015 8:32 AM

I've read this a dozen times and have no idea what you are trying to do, nor why you have this table arranged this way. I don't know what 'raw b' is.

Maybe you should google what you want, such as 'sort data in Excel'.

https://support.office.com/en-in/article/Sort-data-in-a-range-or-table-62d0b95d-2a90-4610-a6ae-2e545c4a4654

__________________
Whiskey, women -- and astrophysics. Because sometimes a problem can't be solved with just whiskey and women.
Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#3
In reply to #1

Re: Excel Logic, who will solve this problem please?

01/09/2015 9:12 AM

Think he means:

Find max. value in column A, (i.e. in cell A3) and copy to C1

Copy corresponding time from column B (i.e. cell B3) to D1

(For "raw" read "row"!).

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Power-User

Join Date: Feb 2007
Location: Aberdeen, Scotland
Posts: 393
Good Answers: 21
#2

Re: Excel Logic, who will solve this problem please?

01/09/2015 9:07 AM

Am I right in thinking what you want to do is find the maximum value of column A and display that in column C, then you want to display the value from column B which correlates to the maximum value in column A in column D?

Register to Reply
2
Power-User

Join Date: Feb 2007
Location: Aberdeen, Scotland
Posts: 393
Good Answers: 21
#4

Re: Excel Logic, who will solve this problem please?

01/09/2015 9:34 AM

If so try this

=INDIRECT(ADDRESS(MATCH(MAX(A:A),A:A,0),2))

Register to Reply Good Answer (Score 2)
Guru
Hobbies - CNC - New Member

Join Date: Jul 2013
Location: Lost Wages Nevada
Posts: 1578
Good Answers: 55
#5

Re: Excel Logic, who will solve this problem please?

01/09/2015 9:38 AM

Fardan
Your question makes absolutely no sense and is likely a homework question?
Please re-state your question because it seems like you are trying to do something that does not compute?

1002:00 AM3004:00 AM
2001:00 AM
3004:00 AM

??????????????????????????????????????????????????????????????????????????????

__________________
Though it does seem he frequently has a Swiss Army knife or Leatherman and a roll of duct tape with him.
Register to Reply
Guru
Hobbies - CNC - New Member

Join Date: Jul 2013
Location: Lost Wages Nevada
Posts: 1578
Good Answers: 55
#7
In reply to #5

Re: Excel Logic, who will solve this problem please?

01/09/2015 10:41 AM

Sorry, I forgot the cell numbering.

ABCD
11002:00 AM3004:00 AM
22001:00 AM
33004:00 AM

However I'm still trying to figure out what you want. I will look at it in a bit.

__________________
Though it does seem he frequently has a Swiss Army knife or Leatherman and a roll of duct tape with him.
Register to Reply
Commentator

Join Date: May 2011
Posts: 76
#6

Re: Excel Logic, Who Will Solve This Problem Please?

01/09/2015 10:32 AM

Sorry about my language

A & B are given, in C column, it is the max value of A column where I use =MAX(A1:A3), but in D I want to copy the corresponding time row of that max value.

Or you can say I want to reach following logic:

if Ci = Ai so Di=Bi, where i= 1,2,3 ....etc.

example:

If C=300, then D= 4:00am.

Here I know that I can use max(A1:A3) for C column, what should I use for D column?

Sorry again for my language.

Register to Reply
Power-User

Join Date: Feb 2007
Location: Aberdeen, Scotland
Posts: 393
Good Answers: 21
#8
In reply to #6

Re: Excel Logic, Who Will Solve This Problem Please?

01/09/2015 11:39 AM

I'm pretty sure I've already shown you how to do that. Type earlier reply in to a cell in column D. It worked with numbers, no reason to think it won't for dates.

Register to Reply
Commentator
United States - US - Statue of Liberty - How's it going?

Join Date: Oct 2012
Location: USA
Posts: 95
Good Answers: 4
#9

Re: Excel Logic, Who Will Solve This Problem Please?

01/10/2015 12:44 AM

Use the vertical lookup in Cell D1. =VLOOKUP(C1,A1:B3,2)

this looks for the value in C1. WHERE C1 IS =MAX(A1:A3)

and returns the value in the second column (2) in the array (A1:b3).

This assumes the values in column A are in order.

read the help file for using the lookup functions for additional uses.

__________________
If you can't explain it simply, you don't understand it well enough. AE
Register to Reply
Associate

Join Date: Feb 2012
Location: Detroit Metro Area
Posts: 30
#18
In reply to #9

Re: Excel Logic, Who Will Solve This Problem Please?

01/12/2015 9:45 AM

The VLOOKUP function needs to be completed.

The equation in cell E2 should read: =VLOOKUP(C1,A1:B3,2,TRUE)

This will solve the problem.

Test this solution by changing any of the values in Column B (100, 200, etc.) to the max value and check the result.

__________________
You can lead a horse to water...
Register to Reply Score 1 for Good Answer
Power-User

Join Date: Sep 2007
Location: Brampton, ON, Canada
Posts: 218
Good Answers: 3
#19
In reply to #18

Re: Excel Logic, Who Will Solve This Problem Please?

01/12/2015 11:16 AM

This answer is correct if sequenced or not sequenced.

Register to Reply
Commentator
United States - US - Statue of Liberty - How's it going?

Join Date: Oct 2012
Location: USA
Posts: 95
Good Answers: 4
#20
In reply to #18

Re: Excel Logic, Who Will Solve This Problem Please?

01/12/2015 12:42 PM

TRUE is not a required argument for the Range_lookup in the VLOOKUP function. If you want to find an exact match, FALSE would be required. This function still won't work if the dataset has duplicates. in the first column.

Norm

__________________
If you can't explain it simply, you don't understand it well enough. AE
Register to Reply
Power-User

Join Date: Sep 2007
Location: Brampton, ON, Canada
Posts: 218
Good Answers: 3
#21
In reply to #20

Re: Excel Logic, Who Will Solve This Problem Please?

01/12/2015 1:37 PM

It will return the first MAX value (sequenced or not), which is still correct.

Register to Reply
Guru
Safety - Hazmat - New Member United States - US - Statue of Liberty - New Member Engineering Fields - Chemical Engineering - Old Hand

Join Date: Mar 2011
Location: Lubbock, Texas
Posts: 14331
Good Answers: 162
#22
In reply to #18

Re: Excel Logic, Who Will Solve This Problem Please?

01/12/2015 2:23 PM

=VLOOKUP(C1,A1:B8,2,TRUE)

I had to change your indices just slightly. That sort of works until one starts changing all the values in the "A" column. There is something not right about using VLOOKUP without sorting the lead column as the instructions explicitly state. Sorting the data table will fix this formula, but it also is allowing approximate match (not OK most of the time), change "TRUE" to 0 for exact match.

VLOOKUP(C1,A1:B8,2,0) using this formula, no sorting of the data table is necessary. It only outputs an exact match.

__________________
If it ain't broke, don't fix it. Just build a better one.
Register to Reply
Commentator

Join Date: May 2011
Posts: 76
#10

Re: Excel Logic, Who Will Solve This Problem Please?

01/10/2015 1:43 AM

nvirciglio and Maca,
Thank you,
Yes this is if it is in order, what if it is not in order? I mean A; B; C and D are always in same Rows but not sequenced (i.e. row 1, then row 45, then row 75..etc)

Register to Reply
Commentator

Join Date: May 2011
Posts: 76
#11
In reply to #10

Re: Excel Logic, Who Will Solve This Problem Please?

01/10/2015 2:01 AM

AB are same rows but not sequenced, CD as well but CD are not same rows as AB!

Register to Reply
Guru
Safety - Hazmat - New Member United States - US - Statue of Liberty - New Member Engineering Fields - Chemical Engineering - Old Hand

Join Date: Mar 2011
Location: Lubbock, Texas
Posts: 14331
Good Answers: 162
#23
In reply to #11

Re: Excel Logic, Who Will Solve This Problem Please?

01/12/2015 2:35 PM

Fardan: First of all - a row is horizontal, and a column is vertical. That might help you get sorted out.

__________________
If it ain't broke, don't fix it. Just build a better one.
Register to Reply
Commentator
United States - US - Statue of Liberty - How's it going?

Join Date: Oct 2012
Location: USA
Posts: 95
Good Answers: 4
#12
In reply to #10

Re: Excel Logic, Who Will Solve This Problem Please?

01/10/2015 2:20 AM

Using the formula that Maca suggested will work as well.

__________________
If you can't explain it simply, you don't understand it well enough. AE
Register to Reply
Commentator

Join Date: May 2011
Posts: 76
#13
In reply to #12

Re: Excel Logic, Who Will Solve This Problem Please?

01/10/2015 5:41 AM

Yes but this is if A ordered sequentially, A:A, I need to fined other way if A is not ordered, A1 jump to A15, between A1 and A15 not included. Is there any solution?

Register to Reply
Guru

Join Date: Oct 2009
Posts: 1460
Good Answers: 30
#14
In reply to #13

Re: Excel Logic, Who Will Solve This Problem Please?

01/10/2015 8:59 AM

With respect, it is difficult to find a logical solution for the analysis of data which has not been entered logically. Your first task is to design a data entry system which ensures that all data ends up in a single table without any gaps. It may be that your initial data entry system leaves gaps, but then the first part of your data analysis routine must be to ensure that there is a data transfer to an intermediate single table with no gaps, on which the final processing is performed. Posts #4 and #9 then offer you entirely workable answers.

Register to Reply
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#15
In reply to #13

Re: Excel Logic, Who Will Solve This Problem Please?

01/10/2015 9:01 AM

Try filling in the empty cells in col. A with zeros.

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Guru
Safety - Hazmat - New Member United States - US - Statue of Liberty - New Member Engineering Fields - Chemical Engineering - Old Hand

Join Date: Mar 2011
Location: Lubbock, Texas
Posts: 14331
Good Answers: 162
#17
In reply to #13

Re: Excel Logic, Who Will Solve This Problem Please?

01/10/2015 2:40 PM

One always has the option of applying data sorting before undertaking the application of the statistical logic function on the data. You have the answers before you, go forth and prosper.

__________________
If it ain't broke, don't fix it. Just build a better one.
Register to Reply
Guru
Safety - Hazmat - New Member United States - US - Statue of Liberty - New Member Engineering Fields - Chemical Engineering - Old Hand

Join Date: Mar 2011
Location: Lubbock, Texas
Posts: 14331
Good Answers: 162
#24
In reply to #13

Re: Excel Logic, Who Will Solve This Problem Please?

01/12/2015 2:39 PM

It is OK, as long as you reference all the data in table in your indirect(match) or vlookup. The rows that are left blank calculate as 0 in the formula for the maximum.

Don't be scared just do it. If you are worried about duplicates, then you should include another function in another row that counts up the duplicates, but how to find the time for the 1st, 2nd, 3rd,... duplicates might be cumbersome.

__________________
If it ain't broke, don't fix it. Just build a better one.
Register to Reply
Guru
Engineering Fields - Nuclear Engineering - New Member

Join Date: Sep 2009
Location: Louisville, OH
Posts: 1925
Good Answers: 36
#16

Re: Excel Logic, Who Will Solve This Problem Please?

01/10/2015 11:47 AM

There is a guy, Mr. Excel, who lives, I think, in Uniontown, OH. He has written quite a few books on Excel, and has another in progress on Tips. One of his books should help.

I have no idea myself, but once you find the Max A, is it possible to increment that cell address to get the time?

__________________
Lehman57
Register to Reply
Register to Reply 24 comments

Good Answers:

These comments received enough positive votes to make them "good answers".

"Almost" Good Answers:

Check out these comments that don't yet have enough votes to be "official" good answers and, if you agree with them, vote them!
Copy to Clipboard

Users who posted comments:

Data Management (1); Fardan (4); James Stewart (4); JohnDG (2); Lehman57 (1); MACA (3); nvirciglio (3); Original_Macgyver (2); phph001 (1); Poison (2); Usbport (1)

Previous in Forum: Looking for a Good Free OCR   Next in Forum: rslogix 5000 Issue

Advertisement