Hi,
 here is a macro u can apply which works well.
Sub test32()
Dim LastRow As Long
Dim j As Long

LastRow = Cells(Rows.Count, "A").End(xlUp).row
k = LastRow
For j = k - 1 To 4 Step -1
        If Worksheets("Sheet1").Cells(k, 1).Value = 
Worksheets("Sheet1").Cells(j, 1).Value Then
           Worksheets("Sheet1").Cells(k, 3).Value = 
Worksheets("Sheet1").Cells(j, 5).Value
           Worksheets("Sheet1").Cells(k, 4).Value = 
Worksheets("Sheet1").Cells(j, 6).Value
           Exit For
           
           
        End If
     Next j
  
End Sub

.r.karunanithi.

--- On Tue, 6/21/11, Subhash Yadav <scy2...@gmail.com> wrote:

From: Subhash Yadav <scy2...@gmail.com>
Subject: Re: $$Excel-Macros$$ solution to put data automtically
To: excel-macros@googlegroups.com
Date: Tuesday, June 21, 2011, 8:35 AM

Thanks a lot my friend....


 
On Wed, Jun 8, 2011 at 10:01 PM, ashish koul <koul.ash...@gmail.com> wrote:

issue = INDEX(E:E,SUMPRODUCT(MAX(($A$4:A10=A11)*ROW($A$4:A10))),0)

reading  =INDEX(F:F,SUMPRODUCT(MAX(($A$4:A10=A11)*ROW($A$4:A10))),0) 





On Wed, Jun 8, 2011 at 7:03 PM, Subhash Yadav <scy2...@gmail.com> wrote:


Dear friends,
 
I am having one sheet containing data for fuel issue.
 
I want, if i put any asset code previous issue and previous reading should come 
from the latest present issue and present reading of same asset.

 
In the attached sheet yellow cell date should come in yellow cell and magenta 
cell data should come in magenta cell.
 
Please help me out.
 

-- 
Subhash Chand Yadav

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip

2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com

4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com


To post to this group, send email to excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>

Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel



-- 


Regards
 
Ashish Koul
akoul.blogspot.com
http://akoul.posterous.com/


akoul.wordpress.com
My Linkedin Profile
 

P Before printing, think about the environment.
 




-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip

2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com

4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com


To post to this group, send email to excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>

Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel



-- 

Subhash Chand Yadav




-- 

----------------------------------------------------------------------------------

Some important links for excel users:

1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip

2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310

3. Excel tutorials at http://www.excel-macros.blogspot.com

4. Learn VBA Macros at http://www.quickvba.blogspot.com

5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

 

To post to this group, send email to excel-macros@googlegroups.com

 

<><><><><><><><><><><><><><><><><><><><><><>

Like our page on facebook , Just follow below link

http://www.facebook.com/discussexcel

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Attachment: SAMPLE FILE-rk.xlsm
Description: application/vnd.ms-excel.sheet.macroenabled.12

Reply via email to