# Posts by Maqbool

• ## Use VBA Code to Apply Conditional Formatting to Multiple Cells w/ 5 conditions each

Re: Use VBA Code to Apply Conditional Formatting to Multiple Cells w/ 5 conditions ea

Hi Mike:

I used the sum function because your initial post was - to highlight if the cells from Q9 to U9 are zero. So you can avoid using "AND/OR" arguments.

If I understand you correctly, you can replace SUM with "Count" function to get the expected result.

Regards

Maqbool

• ## Use VBA Code to Apply Conditional Formatting to Multiple Cells w/ 5 conditions each

Re: Use VBA Code to Apply Conditional Formatting to Multiple Cells w/ 5 conditions ea

Hi Mike:

Sorry. It was not tested and not realized and array wont work in conditional formatting. The attached workbook has a solution to your problem.

Regards

Maqbool

• ## Use VBA Code to Apply Conditional Formatting to Multiple Cells w/ 5 conditions each

Re: Use VBA Code to Apply Conditional Formatting to Multiple Cells w/ 5 conditions ea

Hi Mike:

Use the following formula in conditional formatting. Hope this will help.

[F]
AND((OR(B9={"M1151A1","M1165A1","M1079","M1083","M1073"})),SUM(\$Q\$9:\$U\$9)=0)

[/F]

Regards

Maqbool

• ## Sumif based on criteria

Re: Sumif based on criteria

Hi

Try the following "array formula".
[F]
=IFERROR(SUM(IF(COUNTIF(\$A\$2:A2,A2)=COUNTIF(\$A\$2:\$A\$7,\$A2),IF(\$A\$2:\$A2=\$A2,\$B\$2:\$C2),"")),0)
[/F]

Regards

Maqbool

• ## From each value in "sheet2", Find in "sheet2" and print reference details in "sheet1"

Re: From each value in &quot;sheet2&quot;, Find in &quot;sheet2&quot; and print reference details in &quot;she

Hi

Try the following.

Regards

Maqbool

• ## Dynamic Dates

Re: Dynamic Dates

Hi

Welcome to the forum.

Try the attached.

Regards

makbool

• ## Advanced filter unique value macro with button

Re: Advanced filter unique value macro with button

Hi Help99

Welcome to the forum.

Try the attached.

Regards

Makbool

• ## Position Chart in Range

Re: Position Chart in Range

Hi VMF:

Sorry. It is my mistake and apologies. I have asked you to remove the line to add the chart in the sheet. sorry for that. The following line on your code must be there to create the chart.

Code
``Sheets(shname).Shapes.AddChart.Select``

and I have added one more line in my code to skip the positioning of charts if there is no chart in the sheet

Hope everything will work as you expected.

Regards

Maqbool

• ## Position Chart in Range

Re: Position Chart in Range

Hi

Remove the following from your code.

Code
``````Sheets(shname).Shapes.AddChart.Select
With ActiveChart.Parent
.Top = Range("C9").Top
.Left = Range("C9").Left
.Width = Range("C9:M9").Width
.Height = Range("C9:M28").Height
End With``````

then create a new procedure as below to align the charts on each sheet

and finally call the above at the end of your chart creation code by adding the following line at the end of your code.

Code
``PositionChart``

Regards

Maqbool

• ## Sum table of values using date or year variable

Re: Sumifs

Hi Atomic_Sheep

by a little tweak of NBVC's formula, you can make it.

1. create a named range (rngExpense) for the expense list (table 2 in your example)
2. Use A1 to select your years (Datavalidation List). See the attachement
3. In B1 enter the following formula:
[f]=IFERROR(DATE(\$A\$1,COLUMN()-1,1),"Select Year")[/f]
4. in B2 enter the following formula:
[f]=SUMIFS(INDEX(rngExpense,0,MATCH(\$A2,Sheet2!\$1:\$1,0)),Sheet2!\$A\$1:\$A\$33,">="&B\$1,Sheet2!\$A\$1:\$A\$33,"<="&EOMONTH(B\$1,0))[/f]

Regards

Maqbool

• ## Search value from data sheet, copy the row to another sheet and then strikethrough

Re: Search value from data sheet, copy the row to another sheet and then strikethroug

Hi

Regards

Maqbool

• ## Search value from data sheet, copy the row to another sheet and then strikethrough

Re: Search value from data sheet, copy the row to another sheet and then strikethroug

Hi

Regards

Maqbool

• ## count number of times cells value is greater than 105 and are in consecutive

Re: count number of times cells value is greater than 105 and are in consecutive

Hi

Regards

Maqbool

• ## Summary table of stock returns in VBA - is it doable?

Re: Summary table of stock returns in VBA - is it doable?

Hi

You can remove subtotal of each field that you don't want by going the field settings.

See the attachment.

Regards

Maqbool

• ## Summary table of stock returns in VBA - is it doable?

Re: Summary table of stock returns in VBA - is it doable?

Hi Sameerbuch:

It can be done with a Pivot Table. Dont know why you didn't prefer a PT. See the attached.

Bloomberg has a function to replace the errors. (I am not in-front of pc with bloomberg). Either you can use it or use if function.

Regards

Maqbool

• ## Use MS Query from a sheet in the same workbook

Re: Use MS Query from a sheet in the same workbook

Hi

It seems that Excel Files are not added in your User DSN. Goto ODBC Data Source Administrator and see Excel is there.

Regards

Maqbool

• ## Dlookup Function in Access 2007

Re: Dlookup Function in Access 2007

Hi

http://support.microsoft.com/kb/285866

• ## Multiple Users input data using Excel Userform to a Common Access Master Database

Re: Multiple Users input data using Excel Userform to a Common Access Master Database

Hi

http://support.microsoft.com/kb/246335

Regards

Makbool

• ## VBA Pie chart data labels in percentage, but need to exclude 0 (zero's)

Re: VBA Pie chart data labels in percentage, but need to exclude 0 (zero's)

Hi

Here is my suggestion.

Instead of removing the 0%, use #N/A on that data point. This will not plot on the chart.

See the attached chart.