+ Reply to Thread
Results 1 to 10 of 10

How to Update the Worksheets field value based on updates done in Main Worksheet.

  1. #1
    Registered User
    Join Date
    03-05-2007
    Posts
    12

    How to Update the Worksheets field value based on updates done in Main Worksheet.

    Hello Excel Masters -
    How to Update the Worksheets field value based on updates done in Main Worksheet.
    As i have two different worksheets (Which can be even more then 5) and i want to update the Column Field value of "State" in work sheet "B" & "C" based on the updates done in "State" Column Field value in Worksheet A.
    I just want to update the "State" Column Field value in Worksheet "A" and it should update the "State" Column Field value in Worksheet "B" & "C". Only the criteria to match is Number. Based on number i want to search the values in Worksheet "B" & "C" and want that these values also get updated.

    Please Help. Attached is the same data.
    All help is appreciated in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    To me it looks like you are asking for a Vlookup formula...

    In C2 of sheets B and C, enter formula: =VLOOKUP(A2,'Sheet A'!$A$2:$C$7,3,0)

    and copy these formulas down in each sheet
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    03-05-2007
    Posts
    12
    Hello NBVC.
    Thanks for a prompt reply-
    Well VLOOKUP is surely something for which i am lookign for but here i have some different requirement.

    In Worksheet "B"/"C" etc .....first I want to search a value in Column "A" of worksheet "A" and if this value existing in worksheet "A" udner Column "A" then only i want to make any updates.

    Here i need to perform the search because in worksheet "A" i don't have the sorted order of the values of column "A".And in column "A" of worksheet "A" there are soem thousand values which consist of values from worksheet "B"/"C" etc etc.

    When i search the value by entering the Number (which i want to search in place of A2) and Number in worksheet "A" is alphanumeric then this formula is not working.
    Please seee the attached sample data.

    Please help -
    Attached Files Attached Files
    Last edited by arunsinghpundir; 10-09-2007 at 05:27 AM.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    With alphanumeric or alpha search criteria, you need to enclose the search phrase in double-quotes.

    e.g =VLOOKUP("SPECM10001",'Sheet A'!$A$2:$C$8,3,0)

    Try that formula, copied down.

  5. #5
    Registered User
    Join Date
    03-05-2007
    Posts
    12
    Hello NBVC

    Thanks again ...but still getting some problem with the atatched XLS Sheet....
    It is displaying the error " A Value is not available to the function or formula".


    Please do let me know why i am getting this error as well ......
    Please have a look at this!

    Thanks again for helping me out.
    Attached Files Attached Files

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    The #N/A formula was due to the fact the match item in Sheet A had an extra space at the end... the matches have to be exact so delete that space....

    Also, instead of entering the string into the formula, why not just reference the item in column A of sheets B and C....

    e.g. instead of =VLOOKUP("SEPCM00024823",'Sheet A'!$A$2:$C$8,3,0) try using =VLOOKUP(A2,'Sheet A'!$A$2:$C$8,3,0) copied down.

  7. #7
    Registered User
    Join Date
    03-05-2007
    Posts
    12
    Hello NBVC

    Thanks again ...If i use just reference the item in column A of sheets B and C and not enter the string into the formula then in worksheet "B" it is taking the refrence of "A2" column of worksheet "B" only and not of the worksheet "A".
    Similarly in worksheet "C" it is taking the refrence of "A2" column of worksheet "C" only and not of the worksheet "A".
    but if i enter the string into the formula then then it seems to be working ...
    kindly let me know whats the problem .......as i myself don't wana use string into the formula...kindly help!

    Thanks again for helping me out.
    Attached Files Attached Files

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    You should only enter the formula in the first row (C2) and then copy down the formula, this will automatically change the reference to column A to coincide with the next entry in A.

    To copy the formula down, click and hold the little black square at the bottom right corner of the active cell and drag it down the column.

    See attached.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    03-05-2007
    Posts
    12
    Hello NBVC -

    Perfect ...thats what i was looking for and it helped .But one more issue related to the same, as in Worksheet "B" there are some entries in column "A" which are not present in column "A" of Worksheet "A" ,then i want to keep the value of column "C" in Worksheet "B" intact.

    Currently if i use =VLOOKUP(A2,'Sheet A'!$A$2:$C$8,3,0) in worksheet "B" under column "C" then for unmatached records it is displaying the value as "#NA".
    I want to search the value of Column "A" of worksheet "B" in Column "A" of worksheet "A" and if a matach is found then update the value of Column "C" of worksheet "B" otherwise keep the value of Column "C" of worksheet "B" as what is mentioned.
    Please help.
    Thanks again for helping me out.
    Attached Files Attached Files

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Unfortunately, Excel does not allow you to choose a formula result or leave the cell "untouched" (unless you get into programming it with VBA).

    What I can suggest is that you include another column with a new formula that will look for a match first and if it is not found, then it will take from the original State column.....

    See sample attached...formula in D2 copied down is:
    Please Login or Register  to view this content.
    I hope this works for you
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1