Want to set range for 2 different values on one digitalwrite pin

So I just don't forget to mention that I'm absolute beginner working and learning code and arduino for less then a month for now, and mostly when I learn and search, I'm looking for working examples so I would understand what each line does and how.
So when I google around I find useful info, but I get stuck implementing it or using it in my sketch.
Maybe I'm missing some basics probably, but I'm trying to catch up.

So far this is what I came up with.

I want to control 1 fan on 1 relay and to set up min and max range for temperature and humidity

#include <Wire.h>
#include "DHT.h"
#include "LiquidCrystal.h"
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);
#define DHTPIN 8
#define DHTTYPE DHT22
DHT sensor(DHTPIN, DHTTYPE);

const int vent = 12;        // ventilation relay pin
const int humy = 11;        // humidifier relay pin

//values to turn off and on ventilation based on temperature and RH
float maxTemp = 28.50;
float minTemp = 26.80;
float maxHumy = 55.00;
float minHumy = 53.00;

//values to turn off and on humidifier based on RH
float maxHumy1 = 48.00;
float minHumy1 = 45.00;

void setup() {
  lcd.begin(16, 2);
  sensor.begin();
  digitalWrite(vent, HIGH);
  pinMode(vent, OUTPUT);
  digitalWrite(humy, HIGH);
  pinMode(humy, OUTPUT);
}

void loop() {
  lcd.clear();
  float t = sensor.readTemperature();    //reading the temperature from the sensor
  float h = sensor.readHumidity();       //reading the humidity from the sensor
  h = map(h, 21.8, 91.2, 15.6, 77.6);    //calibration I did to match my hygrometers
  // Checking if the sensor is sending values or not
  if (isnan(t) || isnan(h)) {
    lcd.print("Failed");
    return;
  }
  lcd.setCursor(0, 0);
  lcd.print("T:");
  lcd.print(t);
  lcd.print("C");
  lcd.setCursor(0, 1);
  lcd.print("H:");
  lcd.print(h);
  lcd.print("%");

  //control for ventilation 
  if (t >= maxTemp) {
    digitalWrite(vent, LOW);
    lcd.setCursor(9, 0);
    lcd.print("V:On");
  }
  else if (t <= minTemp) {
    digitalWrite(vent, HIGH);
    lcd.setCursor(9, 0);
    lcd.print("V:Off");
  }

  //controll for humidifier 
  if (h <= minHumy1) {
    digitalWrite(humy, LOW);
    lcd.setCursor(9, 1);
    lcd.print("H:On");
  }
  else if (h >= maxHumy1) {
    digitalWrite(humy, HIGH);
    lcd.setCursor(9, 1);
    lcd.print("H:Off");
  }
}
double map(double x, double in_min, double in_max, double out_min, double out_max) {
  return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}

I tried it like this, but then it only triggers at max values(maxTemp and maxHumy)

  //control for ventilation 
  if (t >= maxTemp || h >=maxHumy) {
    digitalWrite(vent, LOW);
    lcd.setCursor(9, 0);
    lcd.print("V:On");
  }
  else if (t <= minTemp || h <=minHumy) {
    digitalWrite(vent, HIGH);
    lcd.setCursor(9, 0);
    lcd.print("V:Off");
  }

Also I have trouble displaying correctly digitalwrite when it is in the range, it actualy doesnt display at all, but above max or under min its all ok.
That you would say I need boolean there and when I searched bool I got confused even more, as how do you add or set 1 pin for one bool, and 2nd pin for other bool ?

EDIT: This post was changed due to bad/wrong expresion.

Help ?

Add some debugging prints so you can see what values h and t have as well as some that tell you where execution went.

Well everything works fine, I'm just not sure if I wrote these lines correctly for desired operation

//controls ventilation
  if (t >= maxTemp || h >= maxHumy) {
    digitalWrite(vent, LOW);
    lcd.setCursor(9, 0);
    lcd.print("V:On");
  }
  else if (t <= minTemp || h <= minHumy) {
    digitalWrite(vent, HIGH);
    lcd.setCursor(9, 0);
    lcd.print("V:Off");
  }

I modified 1st message since opening this topic, as I probably wasn't clear what I want to do and how, sorry if I'm being too much noobish for you, but I'm still learning

If the code works the way you want it to work, then you coded it correctly.

Paul

Well, it works, but not the exact way I want it. . .