how do i create this if formula?

zilch4ry

Board Regular
Joined
Feb 27, 2011
Messages
76
hi all,

i have an really slight problem- im creating a spreadsheet which identifies how many tills are needed open per hour- what ive been trying to do for the last 30 minutes is create an if formula based on if the number is "1" the text will be displayed "till needed per HR" and if the value is anything higher than 1 the text will read "tills needed per HR".

Its such a basic thing that i thought it would only take a second, can anybody tell me why this isnt working:

Code:
=IF(COUNTIF(G4,1),"till needed per hr.","tills needed per hr.")

If anybody knows the formula which can be used it would be much appreciated ;)

cheers,

tom
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
hi all,

i have an really slight problem- im creating a spreadsheet which identifies how many tills are needed open per hour- what ive been trying to do for the last 30 minutes is create an if formula based on if the number is "1" the text will be displayed "till needed per HR" and if the value is anything higher than 1 the text will read "tills needed per HR".

Its such a basic thing that i thought it would only take a second, can anybody tell me why this isnt working:

Code:
=IF(COUNTIF(G4,1),"till needed per hr.","tills needed per hr.")

If anybody knows the formula which can be used it would be much appreciated ;)

cheers,

tom
Try this...

=IF(COUNT(G4),"Till"&IF(G4=1,"","s")&" needed per hour","")
 
Upvote 0
what are you saying? is the Vlookup not returning anything or is the number there and the formulas not working if so try my IF with the plus 0 which should return a number instead of text
 
Upvote 0
No its the vlookup ive used- the answer is clearly "1" at the moment, but no formula ive tried (even a simple countif) is showing that the answer value is 1; something is really messed up with it
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,848
Members
452,948
Latest member
UsmanAli786

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
Back
Top