+ Reply to Thread
Results 1 to 4 of 4

macro fill fields in sheet based on if statement

  1. #1
    Registered User
    Join Date
    08-17-2012
    Location
    Serbia
    MS-Off Ver
    Excel 2003
    Posts
    24

    macro fill fields in sheet based on if statement

    I have excel sheet with a sheet 'owssvr', attached in the message. I created a macro that creates another sheet 'Karnet'
    this sheet in the first column contains employees from sheet 'owssvr' without duplicates , and in the first row is filled with dates from the current month. I have a macro code

    Please Login or Register  to view this content.

    So I need the code that will compare the columns 'Zaposleni' in both sheets, the first row in sheet 'Karnet' with the column 'Startni datum' in sheet 'owssvr' and if it is in column 'Prisutnost' 'True' in the appropriate field for the employee and the date to enter the symbol '+', the rest '-' in sheet 'Karnet'.
    I made to write in the fields sign '- ' but it 's not working checking in loop. Can you help me. Thank you
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Hydraulics's Avatar
    Join Date
    07-15-2018
    Location
    Udine - Italy
    MS-Off Ver
    Office 365
    Posts
    370

    Re: macro fill fields in sheet based on if statement

    If I understand what you are trying to do, you are simply missing an Exit For instruction after your first If condition:

    Please Login or Register  to view this content.
    Aim high or don't even try.
    ---------------------------------
    If your question has been answered, don't forget to mark the thread as SOLVED.
    If you find an answer helpful, click on the star icon at the bottom of the post.

  3. #3
    Registered User
    Join Date
    08-17-2012
    Location
    Serbia
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: macro fill fields in sheet based on if statement

    i resolve problem with next code
    Please Login or Register  to view this content.
    but i have one more problem, in sheet 'owssvr' i have column 'Zavrsni datum' i need for example if column value 'Startni datum' 8/17/2018 and column value 'Zavrsni datum' 8/20/2018 and column value 'Prisutnost FALSE that in sheet 'Karnet' date between 8/17/2018 and 8/20/2018 i fill cells with sign -.

  4. #4
    Valued Forum Contributor Hydraulics's Avatar
    Join Date
    07-15-2018
    Location
    Udine - Italy
    MS-Off Ver
    Office 365
    Posts
    370

    Re: macro fill fields in sheet based on if statement

    Try with

    Please Login or Register  to view this content.

+ 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. Fill arrays from sheet / SUMIFS / create & fill table based on multiple criteria
    By Dimitris254 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-03-2016, 09:43 AM
  2. Fill in fields from a macro
    By max70 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-17-2014, 05:29 PM
  3. Auto fill macro for fields below the active field
    By Macgyver7 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-11-2014, 06:26 PM
  4. IF statement based on CELL fill or no fill
    By OliB in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-27-2012, 05:12 PM
  5. Macro fill cell based on value from another sheet - columns change
    By tcy1227 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-02-2012, 07:01 AM
  6. Macro or script to auto fill fields
    By Benjamin2008 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-29-2010, 05:28 PM
  7. If Statement based on blank fields
    By alaxmen in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-08-2006, 04:10 PM

Tags for this Thread

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