+ Reply to Thread
Results 1 to 3 of 3

How to check if a name in one sheet exists in other sheet.

  1. #1
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    How to check if a name in one sheet exists in other sheet.

    Hello Forum Members,

    I have to maintain the sales data in a workbook. This workbook has two sheets, one is Input Data and the other is Daily Sales.

    In Input Data sheet I input the sale data of the salesmen who have sold an item that day. The size of data may vary everyday.

    I am new to vba and trying to do this step by step (Please see the code). I don't know if I have written the code correctly but its working for me. There may be some better way to write it but this is beyond my capability.

    Now I am stuck at some point that how can I check whether a salesman no. is present in Input Data sheet and not present in Daily Sales sheet, and if so I need to put that salesman no. and its record in last empty row of Daily Sales Sheet. And if it is found in both sheet, I have to calculate that how much items every salesman has sold today. In Input Data sheet the "sold items" column contains the total sold items so far and I get new data everyday.

    On Daily Sales sheet, after transferring the initial data from the Input Data sheet, I have to enter the today's date in cells E1,F1,G1,H1.....and so on, so that I know how many items every salesman is selling everyday.

    This scenario may be easy for you members, but I am totally lost. So I need the guidance from you experts that how to write a code for the above scenario.

    Please Login or Register  to view this content.
    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    09-04-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    463

    Re: How to check if a name in one sheet exists in other sheet.

    With you above attached file,
    can you provide me your expected answer on Daily sheet
    so that i can understand what do you expect from us. and i can make it on my way....


    Regards
    CA Mahaveer Somani

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: How to check if a name in one sheet exists in other sheet.

    Quote Originally Posted by mahaveersomani View Post
    With you above attached file,
    can you provide me your expected answer on Daily sheet
    so that i can understand what do you expect from us. and i can make it on my way....


    Regards
    CA Mahaveer Somani
    Thanks for the reply.
    Please see the attachment. In the attached workbook I have added four sheets.

    1) Expected output on Daily Sales: The Daily Sales sheet would look like this after calculations.
    2) 25-09-2013: This would be the first data set I will input on INPUT DATA sheet.
    3) 26-09-2013: This would be the second data set that will replace the older data on INPUT DATA sheet on 26-09-2013.
    4) 27-09-2013: This would be the third data set that will replace the older data on INPUT DATA sheet on 27-09-2013.

    This process would be carried out daily i.e. everyday new data will replace the older data in INPUT DATA sheet.

    Note: The column D (Sold Items) on INPUT DATA sheet will contain the total of Sold Items till the current date for each salesman.
    EX. Suppose there is a value of 150 in column D (Sold Items) for a salesman 'S1234' on 01/09/2013, then it will change to 165 on 02/09/2013 if he sells 15 more items on 02/09/2013.

    I hope I have made it clear.

    Regards

    sktneer
    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)

Similar Threads

  1. [SOLVED] Check to see if sheet exists
    By jet2004uk in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-16-2013, 03:43 AM
  2. Replies: 1
    Last Post: 05-29-2013, 01:20 PM
  3. Check to see if a sheet exists
    By michaelbails in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-26-2010, 01:08 AM
  4. check if the sheet/tag exists
    By Alex in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-14-2006, 05:10 PM
  5. How to check from VBA if sheet exists?
    By Alen in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-02-2006, 08:40 AM

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