Wednesday, February 17, 2016

Solution to Error: Insert row based on cell value

Insert row based on cell value

Hi, i need to insert a color row based on a value in B column.

I have something like this:


Employee1....
Employee1....
Employee2....
Employee3....
Employee4....
Employee4....
Employee4....
Employee4....
Employee4....
Employee5....
Employee5....

And i need to be like this:

Employee1....
Employee1....

Employee2....

Employee3....

Employee4....
Employee4....
Employee4....
Employee4....
Employee4....
                              
Employee5....
Employee5....

I need to insert a color row after each employee group.
The range is B3:I250.

Can this be done?

Thanks!

Keys to the Problem Insert row based on cell value


Hi,
 
ALT+F11 to open VB editor, right click 'ThisWorkbook' and insert module and paste the code below in and run it.
 
I have assumed that you have names in this column and not as in your post Employee1 etc.
If that assumtion is incorrect then post back with what precisely you have in Col B.
 
 
Sub insertrowifnamechg()
'insert a row at every name change in a column
MyColumn = "B"
For x = Cells(Rows.Count, MyColumn).End(xlUp).Row To 4 Step -1
    If Cells(x - 1, MyColumn) <> Cells(x, MyColumn) Then
    Rows(x).Insert
    Cells(x, 2).Offset(, -1).Resize(, 9).Interior.Color = vbYellow
    End If
Next x
End Sub


Click here to download the registry repair application


Another Safe way to Fix the problem: Insert row based on cell value:

Click here to download the registry repair application .

How to Fix Insert row based on cell value with SmartPCFixer?

1. Click the button to download SmartPCFixer . Install it on your computer.  Open it, and it will perform a scan for your system. The junk files will be shown in the scan result.

2. After the scan is finished, you can see the errors and problems which need to be fixed.

3. The Repair part is done, the speed of your computer will be much higher than before and the errors have been removed. You can also use other functions in SmartPCFixer. Like dll downloading, windows updating and print spooler error repair.


Related: 2GB RAM Recognized As 1GB,An Error Occurred While Troubleshooting: A Problem Is Preventing The Troubleshooter From Starting,A Application Called APPCRAH Is Preventing My Explorer.exe From Opening In Windows 7 Professional Computer.,Adobe Flashplayer 10,Backup Fails To Complete, There Is Some I/O Device Error,sticky notes and wordpad frozen The instruction at 0x7734a22a referenced memory at 0x00000050 The memory could not be read System Protection does not create restore points automatically taskmgr exe application not found The description for Event ID 0 from source APNMCP cannot be found updates not installing on windows 8 The Windows Internet Explorer Weblog IEBlog IE 9 does not hang from web pages plug ins or java Liar well maybe not informed correctly wants to open worksheet in another woksheet of same workbook Trying to restore my laptop but my ASUS recovery discs are read by Windows as not genuine on a black screen do I need the operating system disc from Windows Sync between lotus notes and windows mobile Upgraded to Windows 7 and now windows media player does not work Transfer pictures from camera to computer but camera is not detected on the computer websites not displaying correctly All browsers are displaying a 12 inch wide page on my 23 inch monitor Uninstall SpeedyPc WITHOUT paying Didn t find out that I had to pay till it was to late Not 1 word about cost till AFTER When conducting a search on Google or Bin search results are not visible I get a blank white page using IE to access a website I get the error message HTTP 406 not acceptable not in format to display,Keyboard keys not working Issues with Windows updates Locking specific rows columns not working Links not working in IE8 margins in MSWord2007 footnote don t seem to be able to match the margins set for the whole document My forced log off screen flashes on and off my screen so fast that I do not have time to answer it my computer boots show windows xp then reboots back around and will not completely load Has my hard drives died Cant even go into safe mode My Outlook Express does not send or recieve mail MY OUTLOOK WONT WORK this is what the error says error cannot open the outlook window the set of folders cannot be opened Message This link not authorized by Yahoo when I click on a Favorite my Windows Cardspace Preview and Delete Card options are blocked and cards exist that I did not create macro to delete rows in a spreadsheet that do not meet the critea My AVERAGEIFS is not working returning DIV 0 error My computer does not go to SLEEP Not a fan of the hyperactive mouse touchpad cursor My Wireless Internet is regisrating as a dial up connection therefore not working,Cannot open anymore attachments in Windows Mail after installing IE9 sony drivers download Fonts Not Displaying Correctly on the blog after Resetting Windows 8 1 VAIO Driver Download Older Program display issue in Windows 8 sony vaio drivers Please help with Windows Update vaio drivers Start menu in Windows 8 vaio drivers update Windows 8 and IE 10 issues vaio drivers update Windows update receiving error code 80240016 when try to update Sony VAIO Driver Download ASUS USB Charger Plus Version V4.0.2 , 11.2 MBytes,Calculator display is glitching in Windows 7 realtek sound drivers Error Windows cannot recognize a system image on this computer unable to restore using backup image realtek hd audio driver New programs and updates are not being installed on Windows 7 32 bit realtek high definition audio driver Problem in sending the word 2007 document by send to email with Windows Live Mail in operating system Windows 7 Error Code Unspecified error realtek audio driver download Start button right click menu options do not work in Windows 8 1 realtek drivers Why does the Windows7 Safety Scanner not work on my HP 64 bit laptop realtek driver Windows Update Error 80070643 when trying to install Office Live add in 1 4 from Windows Update realtek ac97 audio driver two Lots of processors are accompanied by a cooing device, this kind of as heat sinks or fans. In case the cooling gadget includes a back plate, stick it towards the back in the motherboard.
Read More: How to Resolve - \"Non-existent\" add-in causing problems?,How to Resolve - windows 7 internet access randomly shuts down?,How to Resolve - service host hogging up cpu after windows 8.1 update 1?,Solution to Error: Win update stopped working after IE8 installed__,combobox event [Anwsered],Windows 7 HP Laptop will not connect to WiFi,Help with IF and OR statements?,After getting DPC_WATCHDOG_VIOLATION on Win8, win8 fails to boot and has FAILED TO LOAD BOOT DISK error..,QNET Rip-off Review,Backing Up All Files to Google Docs - Good Idea or Bad?

No comments:

Post a Comment