+ Reply to Thread
Results 1 to 10 of 10

if a blank cell in column E or F then inputs "MISSING" in column G

  1. #1
    Registered User
    Join Date
    11-14-2014
    Location
    Derbyshire, England
    MS-Off Ver
    2010
    Posts
    49

    if a blank cell in column E or F then inputs "MISSING" in column G

    Hi,

    I'm after a code that will find blank in columns E or/and F to then input the word MISSING in column G.
    For example
    School Child Forename Child Surname Parent Surname Parent DOB Parent NI Eligible
    school1 cforename1 csurname1 psurname1 1/1/1990 JA123456A Yes
    school1 cforename2 csurname2 psurname2 JA123456B Missing
    school2 cforename3 csurename3 psurname3 1/2/1990 Missing
    school2 cforename3 csurename3 psurname3 1/2/1990 JC123456A No

    Any help is greatly appreciated!

    Thanks Ashley

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.85 (24051214))
    Posts
    8,830

    Re: if a blank cell in column E or F then inputs "MISSING" in column G

    you can use an IF

    =IF( OR( E2="", F2=""), "Missing", "what to put if not blank")

    What decides on the YES or NO in Column G
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    11-14-2014
    Location
    Derbyshire, England
    MS-Off Ver
    2010
    Posts
    49

    Re: if a blank cell in column E or F then inputs "MISSING" in column G

    Hi Etaf,

    thanks for the swifty response. The spreadsheet goes into an automated system provided by the government to see if they're entitled to a specific benefit, however it rejects the spreadsheet if there are any blanks, when the spreadsheet comes back it inputs into column G (Yes if they're eligible) (No if they're not)

    What I need is some code that will find any blanks and mark them as missing, the reason for this is because I have a macro already on the spreadsheet to find "missing" in column G which then deletes and moves from the original tab to another

    Hope this helps

    Thanks

  4. #4
    Registered User
    Join Date
    11-14-2014
    Location
    Derbyshire, England
    MS-Off Ver
    2010
    Posts
    49

    Re: if a blank cell in column E or F then inputs "MISSING" in column G

    1 Thing I forgot, is that the total number of rows, will change on open up as it is an automated spreadsheet from a system I am working on

  5. #5
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.85 (24051214))
    Posts
    8,830

    Re: if a blank cell in column E or F then inputs "MISSING" in column G

    sounds like you need VBA - not my expertise - sorry

  6. #6
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: if a blank cell in column E or F then inputs "MISSING" in column G

    Hi, Ashley1993,

    maybe like this:
    Please Login or Register  to view this content.
    Alternative could be to use AutoFilter, filter for blanks in E and F, fill the area in G with Missing.

    Ciao,
    Holger
    Last edited by HaHoBe; 11-17-2014 at 11:58 AM.
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  7. #7
    Registered User
    Join Date
    11-14-2014
    Location
    Derbyshire, England
    MS-Off Ver
    2010
    Posts
    49

    Re: if a blank cell in column E or F then inputs "MISSING" in column G

    Hi HahoBe,

    That works fantastic!, just a quick one, is there a way of any possibility to create a macro to export to .CSV with selected columns in a different format and with no headers an example is below in the correct format and a blank column in B
    i.e.
    JA123456A pleaseleaveblank 19900101 psurname1
    JC123456A 19900201 psurname3

    please note the date in the original spreadsheet is DD/MM/YYYY and in the .CSV it needs to be yyyymmdd

  8. #8
    Registered User
    Join Date
    11-14-2014
    Location
    Derbyshire, England
    MS-Off Ver
    2010
    Posts
    49

    Re: if a blank cell in column E or F then inputs "MISSING" in column G

    Quote Originally Posted by etaf View Post
    you can use an IF

    =IF( OR( E2="", F2=""), "Missing", "what to put if not blank")

    What decides on the YES or NO in Column G
    Hi etaf,

    Not a problem, and thank you for trying, I do appreciate it! (p.s. +rep'd you)

  9. #9
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.85 (24051214))
    Posts
    8,830

    Re: if a blank cell in column E or F then inputs "MISSING" in column G

    thanks for the rep

  10. #10
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: if a blank cell in column E or F then inputs "MISSING" in column G

    Hi, Ashley,

    please start a new thread on the additional question. If you canīt use the SaveAs that Excel supplies I would recommend a macro, you should make clear what divider you want fot the data and format the date accordingly by using Format.

    Ciao,
    Holger

+ 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] IF a column contains anything other than "" then display the message "MISSING"
    By Richard_Thornton in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-30-2014, 06:45 AM
  2. [SOLVED] Replace all BLANK cells in column with header title "Balance" to "0"
    By ks100 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-21-2014, 09:25 AM
  3. [SOLVED] If there is any text in column "A$" on "sheet1" then move cell to column "A$" on "sheet2"
    By ckgeary in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-27-2013, 08:28 PM
  4. [SOLVED] VBA Search to find value in "O" column under the condition that "S" column is blank
    By nenadmail in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-27-2012, 10:15 AM
  5. [SOLVED] Delete row if cell in Column N equal "Different" or Column P equals "Blank"
    By Cyberpawz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-17-2012, 08:25 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