Very Hard Task - Updated Data

smartguy

Well-known Member
Joined
Jul 14, 2009
Messages
778
Hello All,

Good Day !!!!

I have excel file in the below format.


Excel Workbook
ABCDEFGH
1sdmeeqsnItemhtV1L2
212345M1**100M1*
312345M2**2010M2*
412345ag1E1s119010**
512345ag2E2s220010**
612345ag3E3s321020**
712345ag4E4s422010**
812345ag5E5s523010**
912345ag6E6s624010**
1012345ag7E7s725010**
Sheet1



I want to updated "L2" Data.

Criteria :

If "V1" IS blank i want to update "L2".

Based on "HT" i want to updated "L2"

Example :

If "HT" is "10" then i want to go to "Item" and find the "10" and updated "L2"

Answer :

Excel Workbook
ABCDEFGH
1sdmeeqsnItemhtV1L2
212345M1**100M1*
312345M2**2010M2*
412345ag1E1s119010*M1
512345ag2E2s220010*M1
612345ag3E3s321020*M2
712345ag4E4s422010*M1
812345ag5E5s523010*M1
912345ag6E6s624010*M1
1012345ag7E7s725010*M1
Sheet1
 
Last edited:

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
It is very unclear what you want updating

If "V1" IS blank i want to update "L2".

Update with what? You need to state your requirements with much more clarity
 
Upvote 0
Hello Sir,

Thanks for Reply.

IF"V1" is Blank i want to Update "L2" Value.

What value update in "L2" ?
Go to "HT" and find the no (Example "10") Then Go to "Item" Find the Value ("10") Then find the "me" Value for "10" and update the same in "L2".

i could be clear?
 
Upvote 0
Try this:-
Code:
[COLOR="Navy"]Sub[/COLOR] MG25May37
[COLOR="Navy"]Dim[/COLOR] Rng [COLOR="Navy"]As[/COLOR] Range, Dn [COLOR="Navy"]As[/COLOR] Range, Rw [COLOR="Navy"]As[/COLOR] Range
[COLOR="Navy"]Set[/COLOR] Rng = Range(Range("A1"), Range("A" & rows.Count).End(xlUp))
[COLOR="Navy"]For[/COLOR] [COLOR="Navy"]Each[/COLOR] Dn [COLOR="Navy"]In[/COLOR] Rng
    [COLOR="Navy"]If[/COLOR] Dn.Offset(, 6) = vbNullString [COLOR="Navy"]Then[/COLOR]
        [COLOR="Navy"]For[/COLOR] [COLOR="Navy"]Each[/COLOR] Rw [COLOR="Navy"]In[/COLOR] Rng.Offset(, 4)
            [COLOR="Navy"]If[/COLOR] Rw = Dn.Offset(, 5) [COLOR="Navy"]Then[/COLOR]
                Dn.Offset(, 7) = Rw.Offset(, 2)
                [COLOR="Navy"]Exit[/COLOR] For
             [COLOR="Navy"]End[/COLOR] If
        [COLOR="Navy"]Next[/COLOR] Rw
    [COLOR="Navy"]End[/COLOR] If
[COLOR="Navy"]Next[/COLOR] Dn
[COLOR="Navy"]End[/COLOR] [COLOR="Navy"]Sub[/COLOR]
Regards Mick
 
Upvote 0
Thanks Mr.Mickg

It's Working Fine....

thanksb.gif



436382x06xft4n34.gif
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top