Put date for specific cell according to the condition o another cell and clear cells according to condition VBA codes are not working together

bahadir70

New Member
Joined
Aug 8, 2020
Messages
28
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I asked previously 2 codes from the experienced members and I got vba codes, thanks for the codes. they are working well separately. but I want them working together.

I have an excel sheet for my safety officers fill for daily reports. They are making mistakes while filling, so I want to make it more easy for them and for me as well.

As seen attached pictures, if R3 (condition) is "Open" if they put a date in "Q3" I want "Q3" will be cleared (only value-not format or conditional format)

and if they select "closed" at "R3" I want "Q3" will get the date on the form filled date. (but not like today() option, because today() option is updating the date when we open the form.

I did a data validation for R3 to select "Open" or "Closed"

also,

When I select the classification section "Positive Obs." in column "K" (there are 3 conditions here 1-Positive Obs., 2- Unsafe Act., 3-Unsafe Cond.) and condition "Closed" in column "R", I want the content of the related line column "M" and "Q" content clear (only contents, not formats and conditional formats).

I have seperate codes and can send upon request so the venerable member can maybe explain to me :(, just information, I am very new and old person (50 yrs).
 

Attachments

  • 2020-08-13 15_08_12-2020.08.10_Daily Observation_Siddik.xlsx - Excel.jpg
    2020-08-13 15_08_12-2020.08.10_Daily Observation_Siddik.xlsx - Excel.jpg
    56.7 KB · Views: 3
  • 2020-08-13 15_08_38-2020.08.10_Daily Observation_Siddik.xlsx - Excel.jpg
    2020-08-13 15_08_38-2020.08.10_Daily Observation_Siddik.xlsx - Excel.jpg
    62.6 KB · Views: 2
  • 2020-08-13 15_09_00-2020.08.10_Daily Observation_Siddik.xlsx - Excel.jpg
    2020-08-13 15_09_00-2020.08.10_Daily Observation_Siddik.xlsx - Excel.jpg
    55.3 KB · Views: 2
  • 2020-08-13 15_21_24-Greenshot.jpg
    2020-08-13 15_21_24-Greenshot.jpg
    127.7 KB · Views: 3
  • VBA code1.jpg
    VBA code1.jpg
    62 KB · Views: 3

bahadir70

New Member
Joined
Aug 8, 2020
Messages
28
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
that is perfect for positiv obs and open items :) working perfectly :)



exactly doing what I requested below.

  • While Continuing to fill the form. When column “K” “positive obs.” is selected, and if as a mistake there is date at column “M” and column ”Q”, after the selection of “Closed” at column “R” at “Condition” column, I want column “M” and “Q” contents cleared.
  • And similar, if there is date at column “Q” “correction date” and if the condition at column “R” is selected open, I need correction date is cleared at column “Q”.
 

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)

Watch MrExcel Video

Forum statistics

Threads
1,132,785
Messages
5,655,293
Members
418,187
Latest member
polks111

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
Top