Solved

How can I set color to excel sheet cell using excel advance action?

  • 22 May 2023
  • 1 reply
  • 500 views

Userlevel 1
Badge +5

how can I set color to excel sheet cell using excel advance action, as their is not any action present to set color. It is only present to office 365 Excel action package.

icon

Best answer by Chandrasekhar 7496 22 May 2023, 09:40

View original

1 reply

Userlevel 3
Badge +5

how can I set color to excel sheet cell using excel advance action, as their is not any action present to set color. It is only present to office 365 Excel action package.

Hi Kaif you can use Macros(VB script) 

use Run Macro Action in Excel advanced actions

script Example:-

Sub SetA1RedColor()

Range("A1").Font.Color = RGB(255, 0, 0) ' RGB values for red color

End Sub

 

Note :- Above code used to put red color in only A1 cell

To use this macro, you need to follow these steps:

Press Alt + F11 to open the VBA editor in Excel.
Insert a new module by clicking Insert in the menu and selecting Module.
Copy and paste the above code into the code window on the right.
Close the VBA editor.
Press Alt + F8 to open the Macro dialog box.
Select the "SetA1RedColor" macro from the list and click Run.
Once you run the macro, cell A1 in the active sheet will have red font color. You can modify the RGB values in the code to set a different shade of red if desired.

or

1.use Simulate keystrokes action in keystrokes:- ALT + H + H 

2.then again use Simulate keystrokes action in keystrokes:- 

3.use mouse Action to select exact location of your color.

Reply