[Show all top banners]

shankha
Replies to this thread:

More by shankha
What people are reading
Subscribers
:: Subscribe
Back to: Kurakani General Refresh page to view new replies
 Any MS EXCEL expert out there?

[Please view other pages to see the rest of the postings. Total posts: 28]
PAGE:   1 2 NEXT PAGE
[VIEWED 9475 TIMES]
SAVE! for ease of future access.
The postings in this thread span 2 pages, View Last 20 replies.
Posted on 10-09-06 2:42 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

MS EXCEL experts out there, I need help!!!!!

For example, the following is the original table:

From/To indicates the range for the "value"

Item From To Value
200000002 0.000 0.189 3423
200000002 0.189 0.830 3424
200000002 0.830 3.943 3433
200000002 3.943 4.393 865
200000002 4.393 5.607 3454
200000008 0.000 1.278 8889
200000008 1.278 5.432 5587
200000010 21.625 21.812 4564
200000010 21.812 22.468 4777
200000010 22.468 24.624 4556
200000012 27.068 41.089 6689
200000012 41.089 42.007 7688

I want correct values in the "Value" column in the following table:

Item Location Value
200000002 0.261 (the right value is 3424)
200000008 0.5 ???
200000008 3.698 ???
200000008 4.32 ???
200000008 15.396 ???
200000008 15.757 ???
200000008 16.417 ???

How do I get the right values in the "Value" column. I used VLOOKUP function of Excel but the problem is that VLOOKUP only looks at the first match in the "Item" field. How do I make it to look at the next row when the first match does not meet the criteria? I tried VBA/Macro but my knowledge is limited in these fields.

Helps will be appreciated.
 
Posted on 10-09-06 2:44 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

the tables got messed up!!!!!!!!!
 
Posted on 10-09-06 2:49 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I TRIED TO MAKE THE TABLES CLEAR !!!!

The original table:

From/To indicates the range for the "value"

Item____________From_______To_______Value
200000002_______0.000_______0.189_______3423
200000002_______0.189_______0.830_______3424
200000002_______0.830_______3.943_______3433
200000002_______3.943_______4.393_______865
200000002_______4.393_______5.607_______3454
200000008_______0.000_______1.278_______8889
200000008_______1.278_______5.432_______5587
200000010_______21.625_______21.812_______4564
200000010_______21.812_______22.468_______4777
200000010_______22.468_______24.624_______4556
200000012_______27.068_______41.089_______6689
200000012_______41.089_______42.007_______7688

I want correct values in the "Value" column in the following table:

Item_____________Location_______Value
200000002_______0.261_______(the right value is 3424)
200000008_______0.5__________???
200000008_______3.698________???
200000008_______4.32_________???
200000008_______15.396_______???
200000008_______15.757_______???
200000008_______16.417_______???
 
Posted on 10-09-06 3:05 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Your question does not make any sense.

Just imaging you are someone else reading your question. Can you figure out whatever the heck the writer is talking about?
 
Posted on 10-09-06 3:11 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Hi,
I might be able to help you out with this. Couple of questions: In your 'location' column, the numbers you have generated is not the same as the original column.
200000002_______0.189_______0.830_______3424
200000002_______0.261_______(the right value is 3424)

How did you get the right value? Is there a special formula involved or you randomly generated the numbers?
 
Posted on 10-09-06 3:27 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Since it is excel, the numbers you have written there are the rows and columns dependent.

If you can give a screenshot of the spreadsheet you are working on, it would give more sense and hopefully closer to helping you.
 
Posted on 10-09-06 3:39 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

How come the end values, I mean the column 'To' has value which coincides with the value in the 'From' column in the following rows?
for example you see .189 in the first row as the 'To' value and
shows up again as .189 in the second row in the 'From' value..

This problem has been given a twist in the presentation part
 
Posted on 10-09-06 3:40 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

A quick question if you are still around: is 'location' your range of 'to' and 'from'?
 
Posted on 10-09-06 3:50 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Hmmm... is this Shanka fella gonna let us pick our brain and vanish??? From his posting, it looked like he needed urgent help...now we are all ready to go, but he is gone!! What happened to respecting other people's time??
 
Posted on 10-09-06 4:08 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

hey, bhusan:

I guess, I made my question a lil complicated. actually, i want the correct value in the second table. e.g., the value in the first row in the second table should be 3424 (by observation) as location 0.261 is in the range of 0.189 to 0.830 in the first column, right? similarly, the value in the last row at location 16.417 against Item 200000008 is none as this location is beyond the range of 0 to 1.278 and 1.278 to 5.432 against Item 200000008 in the first table. i have thousands of data. so the question is how do i make excel to do it for me, ie, return me the right value at a location of an item as specified by the range.

hey, bostongirl:

Yes the location is not the same. these are the given locations at which i need the correct values from first table in which the values are specified by the range. clear??

hey, Slackdemic:

I will try to include the screenshots!

hey, TM:

Yes. thats true. but thats how i got the data - thousands of entry. i guess we will have to ignore that part.

GUYS!!! LEMME KNOW IF U STILL VE QUESTIONS.
 
Posted on 10-09-06 4:18 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

value in the first row in the second table should be 3424 (by observation) as location 0.261 is in the range of 0.189 to 0.830 in the first column, right?


No, how can 0.261 fall in the range of 0.189 to 0.830?
 
Posted on 10-09-06 4:22 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

the screenshots!!

 
Posted on 10-09-06 4:29 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

i kind of think without VBA/Macro the problem is not going to solve. tell me if i m wrong.
 
Posted on 10-09-06 4:32 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I doubt Vlookup is going to be of any help in this. I tried couple of combinations and it doesnt give you the right 'value' because its not capable of recognizing where the 'location' falls in between the ranges. You might want to go through macros in this one.
 
Posted on 10-09-06 4:44 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

hey, bostongirl!

exactly!

but i never worked with macros before. was trying to write a macro but it did not work.
 
Posted on 10-09-06 4:51 PM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

hey, bostongirl! can you tell me whats wrong with following. it did not work.

Sub try()
'
' route1 is the table_array.

Do

If IsEmpty(ActiveCell) Then

If ActiveCell.FormulaR1C1 = "=IF(AND(RC[-1]>=VLOOKUP(RC[-2],route1,2,0),RC[-1]<=VLOOKUP(RC[-2],route1,3,0)),VLOOKUP(RC[-2],route1,5,0),""Error!!!"")" = "Error!!!" Then

route1.Range (x + 1)

Else

ActiveCell.FormulaR1C1 = "=IF(AND(RC[-1]>=VLOOKUP(RC[-2],route1,2,0),RC[-1]<=VLOOKUP(RC[-2],route1,3,0)),VLOOKUP(RC[-2],route1,5,0),""Error!!!"")"

End If

End If

ActiveCell.Offset(1, 0).Select

Loop Until ActiveCell = "g"

End Sub
 
Posted on 10-10-06 12:51 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

here is your macro bro!

Sub test()
For i = 2 To 13 ' number of data rows in input array
For j = 2 To 8 ' number of data rows in output array
If Cells(j, 7) = Cells(i, 1) And Cells(j, 8) >= Cells(i, 2) And Cells(j, 8) <= Cells(i, 3) Then
Cells(j, 9) = Cells(i, 4)
End If
Next j
Next i
End Sub

NOTE:

you have to play with i and j values. this module works for the number you have put up in your first post. i'm attaching my excel snapshot. i guess you can go from there. if not email me and i can help. you have to change i, j and column values in IF statement as per the location of your tables. my best advice is try to match your spreadsheet as how i did. :) hope this helps.

 
Posted on 10-10-06 12:52 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

here is the vba module

 
Posted on 10-10-06 8:52 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

hyaa... Good work!
:)
 
Posted on 10-10-06 9:23 AM     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

hyaaaaaaaaaaaaa!!!!

gr8! thanks bro.
 



PAGE:   1 2 NEXT PAGE
Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 90 days
Recommended Popular Threads Controvertial Threads
TPS Re-registration case still pending ..
TPS EAD auto extended to June 2025 or just TPS?
मन भित्र को पत्रै पत्र!
TPS Renewal Reregistration
अमेरिकामा बस्ने प्राय जस्तो नेपालीहरु सबै मध्यम बर्गीय अथवा माथि (higher than middle class)
Guess how many vaccines a one year old baby is given
Nepali Passport Renew
They are openly permitting undocumented immigrants to participate in federal elections in Arizona now.
Driver license help ASAP sathiharu
Why Americans reverse park?
Biden said he will issue new Employment visa for someone with college degree and job offers
whats wrong living with your parents ?
" अनि ग्रिन कार्ड बन्यो त ?"
मैले नबुझेका केहि गीत का lyrics हरु
Nims- एक उन्मत्त साँढे
cannot accept Visa candidates
lost $3500 on penny stocks !!!
TPS Reregistration and EAD Approval Timeline.......
ढ्याउ गर्दा दसैँको खसी गनाउच
nrn citizenship
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters