cancel
Showing results for 
Search instead for 
Did you mean: 

Highlighting a particular row in Bex

Shamscharma
Participant
0 Kudos

I need to highlight partticular rows of my report.

Probably I would know some text to identify those rows.

For example 'SUBTOTAL' etc.

I know its got something to do with VB but I am not a VB guy.

I would love it if someone sends me VB Code and instructions about how to incorporate it.

Any help would be great!

Thanks!

Ram

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Pls find the following code to change the background of One particular cell containing text "Delivery"

Sub SAPBEXonRefresh(queryID As String, resultArea As Range)

For i = 1 To 1000

If Worksheets("Sheet1").Cells(i, 1).Value = "Delivery" Then

Worksheets("Sheet1").Cells(i, 1).Interior.Color = RGB(200, 160, 35)

End If

Next

End Sub

Assumption:

1. "Delivery" Text lies anywhere in the first column.

2. Background of Cell Containing "Delivery" Needs to be changed to Orange.

You have to modify your code as per you workbook. But at least this code will give u some syntax knowledge.

Shamscharma
Participant
0 Kudos

Thanks Danny,

Would you be able to tell where to incorporate this code!

Thanks a lot!

Former Member
0 Kudos

Open your query... Press Alt+F11 (or open Visual Basic Editior from Context menu)

you will see Sub SAPBEXonrefresh() and End Sub.

write your code.... or let me know your situation (worksheet format...) and i will send you code according to your requirement..

Shamscharma
Participant
0 Kudos

Danny.

I have severel rows of data as follows:

12 ABC 20.00

13 DEF 25.00

14 GHI 27.00

15 JKL 30.00

16 MNO 21.00

17 TUV 23.00

I want to highlight lines 15 that has JKL in col2

and line 17 that has TUV in col2

Actually 15 and 17 are acc numbers

I was trying the code sent by you but it has not worked so far.

Hopefully this works after the result has been displayed.

Thanks for your offer and help!

Shamscharma
Participant
0 Kudos

Thanks Danny! That worked.

Shamscharma
Participant
0 Kudos

Thanks Danny! That worked.

But I need to do same on Web.

Do you have a fix?

Answers (0)