If formulae and excluding scenario's

Kevincfc

New Member
Joined
Jul 31, 2017
Messages
2
Hi, sorry if the following excel question is basic but any help would be greatly appreciated.

I am currently working on a spreadsheet that comes daily, which contains prices in two rows.

So i currently have an if function (=if(a1=b1,"stalepriced'',dailypriced") that if the price in column a is the same as column b then it means that the price is ''stale priced''. Likewise if the prices in the columns are different then it would return ''daily priced''.

However the file that I receive daily never contains the same amount of rows. So as a result when I record a VBA, blank rows with no prices will give a ''stale priced'' return when there is less rows. Which is incorrect.

Is there possibly a way to amend the If formulae to take the blank cells into consideration, and exclude them?

Any help greatly appreciated.

Kevin
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Try
=if(or(a1="",b1=""),"",if(a1=b1,"stalepriced'',dailypriced"))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,523
Messages
6,125,318
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