Fill define colours

Kishan

Well-known Member
Joined
Mar 15, 2011
Messages
1,648
Office Version
  1. 2010
Platform
  1. Windows
Using Excel 2000

Hi,

I got results in cells C8:C70
Define colours in the cell F7:F16 as shown for different 9 patterns.


In the cell C6 got 3-X, I want to fill all 3-X find in Column C with colour is find in cell F15, and only the below the 3-X fill colours as per pattern (colours shown in cells F7:F16)

Example 3-X is in the cells C12:C13 so fill below in the 2-2 colours from as shown in F14

Example data..


Book1
ABCDEFG
1
2
3
4
5
63-XFill These
7ResultsColours
81-X0
901-1
101-11-X
112-11-2
123-X2-1
133-X2-X
142-22-2
152-X3-X
161-13-2
171-X
182-1
193-X
202-2
212-X
221-1
231-1
242-1
253-X
262-X
271-1
282-2
292-1
303-X
313-2
320
332-X
342-1
353-X
362-2
371-X
380
393-X
403-X
413-X
423-X
433-X
442-X
451-2
460
470
483-X
491-1
501-1
512-X
522-1
533-X
541-X
552-2
562-1
573-X
580
591-1
602-1
613-X
623-X
632-X
642-2
652-1
663-X
673-X
683-X
691-X
702-X
71
72
Sheet1


Thank you in advance

Regards,
Kishan
 
Last edited:
Hi mikerickson, changing the, with; pass the line
Code:
strFormula = "=AND(LEN(" & strAddress & ")>0," & strFormula & "   )"
Code:
[COLOR=#ff0000][B]To like this [/B][/COLOR][COLOR=#000000]strFormula = "=AND(LEN(" & strAddress & [/COLOR][COLOR=#ff0000][B]")>0[/B][/COLOR][COLOR=#ff0000][B];[/B][/COLOR][COLOR=#000000]" & strFormula & "   )"[/COLOR]


But now stuck on the line below
Code:
 .Add Type:=xlExpression, Formula1:=strFormula

Error ' 438 ' occurred at run time:


Please could you check?

Thank you in advance

Regards,
Kishan
 
Upvote 0

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
It works for me. Might you have merged cells in column B?
Hi mikerickson, thank you for your answer, yes I believe that you posted after it has worked for you.

May it is my version 2000 giving a problem and producing an error

I just open a new workbook rewrite all again but it the same problem continue I don't find the way to trace it

Please could you tell me how could can solve it?

Thank you

Regards,
Kishan

 
Upvote 0
Hi, Please if anyone is using excel 2000, can give a try the VBA code is in the post#9, I have broken my head but it stuck on line below. and cannot get it work.

Code:
 .Add Type:=xlExpression, Formula1:=strFormula

I do not know what I am doing wrong

Thank you in advance

Regards,
Kishan
 
Upvote 0
Hi, 275 views seems everyone is updated latest versions

Is there any conditional formatting formula which and do the job will be fine too because it seems VBA post#9 is not compatible with my version

Thank you in advance

Regards,
Kishan
 
Upvote 0
Hi,

Spend hours goggling, and search entire MrExcel Message Board I am sure there are 100 of conditional format VBA and formula but such like mine, format after particular pattern and use format from the range define is not found.

The thing is that code is in the post#9 given by mikerickson is working for him correctly so he cannot make any alteration which is right, I think to get solve this if some one can have excel 2000 or can give here any other alternate code will be great full of him.

If I am getting "Run-time error '5' Invalid procedure call or argument." that mean I am doing something wrong, but what I don't know even I reinstall my excel again but not luck

Hope I might get some solution.

Thank you in advance

Regards,
Kishan
 
Last edited:
Upvote 0
My Last Bump
May some one have got solution ?

Regards,
Kishan
 
Upvote 0
Thank you everyone, has looked this thread may my query is wrong will find another way to explain it in the new thread.

Regards,
Kishan
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,636
Latest member
laura12345

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