Filling empty cell

Closed
shalini - Feb 7, 2011 at 12:55 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Feb 8, 2011 at 09:33 AM
Hello,
could somebody provide me with a macro vb code to select empty cells along column g,h,i ..and fill them with text .. all the cells in g will have same text like wise h and i ... have tried using macros ..but i hav lot of xcel scripts and number of rows are always diffrent in every sheet ....can somebody please help me.



3 responses

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Feb 7, 2011 at 09:06 AM
Hi shalini,

So you want to look through columns G, H and I to find any empty cells.
When empty cell is found you want to fill it with ........ you lost me there.
What do you want to put in the empty cells?
Posting a couple of rows of your sheet would also be helpfull.

Best regards,
Trowa
0
first of all thanks a lot.4 ur attention .. now about my problem ..i have lots of workbooks of test scripts as i am a testing analyst ...all the scripts are having last three columns with g,h and i ..now as i said all the cells in above mentioned columns are empty or sometimes filled with some text in few cases except the column header .which .is always same throughout all my workbooks. . i don't want do do any thing to the column headers. . all cells in g are going to have same text through out like wise "i" column . but column h will be also same but only within the same workbook .it will vary when i proceed to next work book .. i don care of previous text if there is any in the cells ....i just don want to disturb the column headers ..now main problem is when i record of macro for copying pasting to get required result it works but the no. of rows are in every sheet id different .. so if i record a macro using sheet with number of rows 45 .. then use the same on sheets which have number of rows not equal to 45.. . ..for ur help let me tell u that in my scripts column d is has column heading as serial number ..so down the the column its 1 2,3, and so on but as number of rows are not same varying in every script . if a macro code can be written in vb say when ever in a ROW if the value cell d is numeric (number rows will not pass 200 in any of my sheets) so and so text has to filled in the corresponding g,h and i. . sorry for all that boring explanations but what can i do this repetitive work i can do .. .. so plz if somebody can help me ................
0
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Feb 8, 2011 at 09:33 AM
Hi Shalini,

Quote
if a macro code can be written in vb say when ever in a ROW if the value cell d is numeric (number rows will not pass 200 in any of my sheets) so and so text has to filled in the corresponding g,h and i.
unquote

Let me rephrase to see if I understand you:
Find value in range D2:D200. When value found, copy to the same row of column G, H and I.

So when, for example, D5 contains the value: "Hello" you want it to be copied to G5, H5 and I5.

Did I understand you correctly?

Best regards,
Trowa
0