how to use If function in excel using vba on entire column

m_vishal_c

Board Regular
Joined
Dec 7, 2016
Messages
209
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
hi Everyone
i have one excel workbook. The column structure is as below
AY AZ BB
date date -------

there are more then 4000 records(rows) in AY and AZ column. I need if function like if(AZ>=AY,"",AY) through vba. this formula will be placed on BB column

is anybody help me out

heaps thanks in advance

thanks
 
Question
Are there formulas in column BB? If so, show us the formulas.

M.
the below my formula is not in that sheet, I have placed my formula in another sheet (same workbook).

=COUNTIFS(ABC!$B:$B,A2,ABC!$BB:$BB,"<>")

in BB column there is not any formulas and after applying your formula I applied below code

Sheets("ABC").Columns(54).Copy
Sheets("ABC").Columns(54).PasteSpecial xlPasteValues

so only values left not any formula
 
Upvote 0

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
If I understood correctly, in column BB are the results of the above formula (post 4)
So in column BB there are cells with numbers and some cells that contains "" (empty string).
Question: are the numbers always positives or positives and negatives?

M.
 
Upvote 0
If I understood correctly, in column BB are the results of the above formula (post 4)
So in column BB there are cells with numbers and some cells that contains "" (empty string).
Question: are the numbers always positives or positives and negatives?

M.
hi. yes you are right. in BB column there are some blank cells and values too (its Date). I just need to count how many dates are there
thanks
 
Upvote 0

Forum statistics

Threads
1,215,528
Messages
6,125,338
Members
449,218
Latest member
Excel Master

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