CF - From 2 cells in row

ExcelRoy

Well-known Member
Joined
Oct 2, 2006
Messages
2,456
Office Version
  1. 2007
Platform
  1. Windows
Hi,

Can i please ask for some help

I am looking to highlight 2 points in a row between cells entered as "In" and "Out"

What would be the best way to achieve this, assume CF ?

Range is within columns K:NH
 

Some videos you may like

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
12,618
Office Version
  1. 2007
Platform
  1. Windows
Try this formula:
=OR(K1="In",K1="Out")

Applies to:
=$K:$NH
 

ExcelRoy

Well-known Member
Joined
Oct 2, 2006
Messages
2,456
Office Version
  1. 2007
Platform
  1. Windows
Hi DanteAmor,

Many thanks but this only highlights those points (ie "In" and "Out"and not inbetween

Thanks
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
56,492
Office Version
  1. 365
Platform
  1. Windows
Try the following.
Select columns K:NH on your sheet, and enter this Conditional Formatting formula:
Excel Formula:
=AND(COUNTIF($K1:K1,"In")>0,COUNTIF(K1:$NH1,"Out")>0)
and select your desired formatting color.
 

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
12,618
Office Version
  1. 2007
Platform
  1. Windows

ADVERTISEMENT

Try this:

Excel Formula:
=AND(COLUMN()>=MATCH("in",1:1,0),COLUMN()<=MATCH("out",1:1,0))
 
Last edited:

ExcelRoy

Well-known Member
Joined
Oct 2, 2006
Messages
2,456
Office Version
  1. 2007
Platform
  1. Windows
Thankyou Both, perfect solutions

One step on from this, would it be possible to highlight cells based on time remaining

At the moment each cell denotes a calendar day (Weekday only)

ie, a job would be given 74 hours to complete and 20 has been used leaving 50 remaining could this be highlighted using CF

The hours left would be as follows totaling 32 hours

Mon 7 hours
Tues 7 hours
Wed 7 hours
Thu 7 hours
Fri 4 hours

So from the point of "In" to calculate a automatic "Out" date based on a cell value of total hours worked against total hours remaining

Many thanks
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
56,492
Office Version
  1. 365
Platform
  1. Windows
ie, a job would be given 74 hours to complete and 20 has been used leaving 50 remaining could this be highlighted using CF

The hours left would be as follows totaling 32 hours

Mon 7 hours
Tues 7 hours
Wed 7 hours
Thu 7 hours
Fri 4 hours

So from the point of "In" to calculate a automatic "Out" date based on a cell value of total hours worked against total hours remaining
That is an entirely different question from your original question, and thus probably warrants its own thread.
 

Watch MrExcel Video

Forum statistics

Threads
1,126,986
Messages
5,621,995
Members
415,873
Latest member
fuulhouse

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